qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Samuel Tardieu <sam@rfc1149.net>
Cc: qemu-devel@nongnu.org,
	"Arnaud Minier" <arnaud.minier@telecom-paris.fr>,
	qemu-arm@nongnu.org, "Anton Kochkov" <anton.kochkov@proton.me>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Inès Varhol" <ines.varhol@telecom-paris.fr>,
	"Alexandre Iooss" <erdnaxe@crans.org>
Subject: Re: [PATCH v2 2/3] hw/arm/armv7m: alias the NVIC "num-prio-bits" property
Date: Fri, 5 Jan 2024 17:48:01 +0000	[thread overview]
Message-ID: <CAFEAcA8k22X+8Ypw_gvpsFHVAm=pHnB2-_iVNwyMrHhhyP=JRA@mail.gmail.com> (raw)
In-Reply-To: <20240103155337.2026946-3-sam@rfc1149.net>

On Wed, 3 Jan 2024 at 15:53, Samuel Tardieu <sam@rfc1149.net> wrote:
>
> A SoC will not have a direct access to the NVIC embedded in its ARM
> core. By aliasing the "num-prio-bits" property similarly to what is
> done for the "num-irq" one, a SoC can easily configure it on its
> armv7m instance.
>
> Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
> ---
>  hw/arm/armv7m.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
> index d10abb36a8..4fda2d1d47 100644
> --- a/hw/arm/armv7m.c
> +++ b/hw/arm/armv7m.c
> @@ -256,6 +256,8 @@ static void armv7m_instance_init(Object *obj)
>      object_initialize_child(obj, "nvic", &s->nvic, TYPE_NVIC);
>      object_property_add_alias(obj, "num-irq",
>                                OBJECT(&s->nvic), "num-irq");
> +    object_property_add_alias(obj, "num-prio-bits",
> +                              OBJECT(&s->nvic), "num-prio-bits");
>
>      object_initialize_child(obj, "systick-reg-ns", &s->systick[M_REG_NS],
>                              TYPE_SYSTICK);

There's a comment in include/hw/arm/armv7m.h which documents
all the GPIO inputs, QOM properties, etc, that this device
has -- that also needs a line adding to it for this property.

Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


  reply	other threads:[~2024-01-05 17:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03 15:53 [PATCH v2 0/3] Add "num-prio-bits" property for Cortex-M devices Samuel Tardieu
2024-01-03 15:53 ` [PATCH v2 1/3] hw/intc/armv7m_nvic: add "num-prio-bits" property Samuel Tardieu
2024-01-05 17:45   ` Peter Maydell
2024-01-03 15:53 ` [PATCH v2 2/3] hw/arm/armv7m: alias the NVIC " Samuel Tardieu
2024-01-05 17:48   ` Peter Maydell [this message]
2024-01-05 18:01     ` Samuel Tardieu
2024-01-03 15:53 ` [PATCH v2 3/3] hw/arm/socs: configure priority bits for existing SOCs Samuel Tardieu
2024-01-05 17:55   ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFEAcA8k22X+8Ypw_gvpsFHVAm=pHnB2-_iVNwyMrHhhyP=JRA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=alistair@alistair23.me \
    --cc=anton.kochkov@proton.me \
    --cc=arnaud.minier@telecom-paris.fr \
    --cc=erdnaxe@crans.org \
    --cc=ines.varhol@telecom-paris.fr \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sam@rfc1149.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).