qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: jcksn@duck.com, qemu-devel@nongnu.org
Cc: alistair@alistair.me
Subject: Re: [PATCH 4/6] MAX78000 GCR implementation
Date: Mon, 16 Jun 2025 07:13:53 +0200	[thread overview]
Message-ID: <ae86b2f5-289a-4767-9704-41f019187ec1@linaro.org> (raw)
In-Reply-To: <ACFFEE84-30F3-4A74-93C0-5E18B0412D25.1@smtp-inbound1.duck.com>

Hi,

On 10/5/25 06:20, jcksn@duck.com wrote:
> This patch implements the Global Control Register for the MAX78000 SOC
> 
> Signed-off-by: Jackson Donaldson <jcksn@duck.com>
> ---
>   hw/arm/Kconfig                 |   1 +
>   hw/arm/max78000_soc.c          |   9 +-
>   hw/misc/Kconfig                |   3 +
>   hw/misc/max78000_gcr.c         | 285 +++++++++++++++++++++++++++++++++
>   hw/misc/meson.build            |   1 +
>   include/hw/arm/max78000_soc.h  |   2 +
>   include/hw/misc/max78000_gcr.h | 122 ++++++++++++++
>   7 files changed, 422 insertions(+), 1 deletion(-)
>   create mode 100644 hw/misc/max78000_gcr.c
>   create mode 100644 include/hw/misc/max78000_gcr.h


> diff --git a/hw/arm/max78000_soc.c b/hw/arm/max78000_soc.c
> index 6334d8b49b..7a012c6ef7 100644
> --- a/hw/arm/max78000_soc.c
> +++ b/hw/arm/max78000_soc.c
> @@ -29,6 +29,8 @@ static void max78000_soc_initfn(Object *obj)
>   
>       object_initialize_child(obj, "armv7m", &s->armv7m, TYPE_ARMV7M);
>   
> +    object_initialize_child(obj, "gcr", &s->gcr, TYPE_MAX78000_GCR);
> +
>       for (i = 0; i < MAX78000_NUM_ICC; i++) {
>           object_initialize_child(obj, "icc[*]", &s->icc[i], TYPE_MAX78000_ICC);
>       }
> @@ -104,6 +106,10 @@ static void max78000_soc_realize(DeviceState *dev_soc, Error **errp)
>           return;
>       }
>   
> +    dev = DEVICE(&s->gcr);
> +    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), errp);
> +    sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0x40000000);
> +
>       for (i = 0; i < MAX78000_NUM_ICC; i++) {
>           dev = DEVICE(&(s->icc[i]));
>           sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), errp);
> @@ -116,6 +122,8 @@ static void max78000_soc_realize(DeviceState *dev_soc, Error **errp)
>           if (!sysbus_realize(SYS_BUS_DEVICE(&s->uart[i]), errp)) {
>               return;
>           }
> +        dev->id = g_strdup_printf("uart%d", i);

This line belongs to the previous patch (UART implementation).

>           busdev = SYS_BUS_DEVICE(dev);
>           sysbus_mmio_map(busdev, 0, max78000_uart_addr[i]);
>           sysbus_connect_irq(busdev, 0, qdev_get_gpio_in(armv7m,
> @@ -123,7 +131,6 @@ static void max78000_soc_realize(DeviceState *dev_soc, Error **errp)



  reply	other threads:[~2025-06-16  5:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250510042043.2056265-1-jcksn@duck.com>
2025-05-10  4:20 ` [PATCH 1/6] MAX78000: Add MAX78000FTHR Machine jcksn
2025-06-13 15:01   ` Peter Maydell
2025-05-10  4:20 ` [PATCH 2/6] MAX78000: ICC Implementation jcksn
2025-06-13 15:26   ` Peter Maydell
2025-05-10  4:20 ` [PATCH 3/6] MAX78000 UART implementation jcksn
2025-06-13 16:03   ` Peter Maydell
2025-05-10  4:20 ` [PATCH 4/6] MAX78000 GCR implementation jcksn
2025-06-16  5:13   ` Philippe Mathieu-Daudé [this message]
2025-06-16  9:47   ` Peter Maydell
2025-05-10  4:20 ` [PATCH 5/6] MAX78000 TRNG Implementation jcksn
2025-06-16  9:56   ` Peter Maydell
2025-05-10  4:20 ` [PATCH 6/6] MAX78000 AES implementation jcksn

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=ae86b2f5-289a-4767-9704-41f019187ec1@linaro.org \
    --to=philmd@linaro.org \
    --cc=alistair@alistair.me \
    --cc=jcksn@duck.com \
    --cc=qemu-devel@nongnu.org \
    /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).