qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Strahinja Jankovic <strahinjapjankovic@gmail.com>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: Beniamino Galvani <b.galvani@gmail.com>,
	Niek Linnenbank <nieklinnenbank@gmail.com>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	Strahinja Jankovic <strahinja.p.jankovic@gmail.com>
Subject: Re: [PATCH 3/4] hw/arm: Add WDT to Allwinner-H3 and Orangepi-PC
Date: Mon, 13 Mar 2023 08:53:31 +0100	[thread overview]
Message-ID: <a63469d1-e163-43b2-c39c-c3b7c0a6eacc@linaro.org> (raw)
In-Reply-To: <20230311144111.30468-4-strahinja.p.jankovic@gmail.com>

Hi,

On 11/3/23 15:41, Strahinja Jankovic wrote:
> This patch adds WDT to Allwinner-H3 and Orangepi-PC.
> WDT is added as an overlay to the Timer module memory area.
> 
> Signed-off-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com>
> ---
>   docs/system/arm/orangepi.rst  | 1 +
>   hw/arm/Kconfig                | 1 +
>   hw/arm/allwinner-h3.c         | 8 ++++++++
>   include/hw/arm/allwinner-h3.h | 5 ++++-
>   4 files changed, 14 insertions(+), 1 deletion(-)


> diff --git a/hw/arm/allwinner-h3.c b/hw/arm/allwinner-h3.c
> index 69d0ad6f50..f05afddf7e 100644
> --- a/hw/arm/allwinner-h3.c
> +++ b/hw/arm/allwinner-h3.c
> @@ -49,6 +49,7 @@ const hwaddr allwinner_h3_memmap[] = {
>       [AW_H3_DEV_OHCI3]      = 0x01c1d400,
>       [AW_H3_DEV_CCU]        = 0x01c20000,
>       [AW_H3_DEV_PIT]        = 0x01c20c00,
> +    [AW_H3_DEV_WDT]        = 0x01c20ca0,
>       [AW_H3_DEV_UART0]      = 0x01c28000,
>       [AW_H3_DEV_UART1]      = 0x01c28400,
>       [AW_H3_DEV_UART2]      = 0x01c28800,
> @@ -234,6 +235,8 @@ static void allwinner_h3_init(Object *obj)
>       object_initialize_child(obj, "twi1",  &s->i2c1,  TYPE_AW_I2C_SUN6I);
>       object_initialize_child(obj, "twi2",  &s->i2c2,  TYPE_AW_I2C_SUN6I);
>       object_initialize_child(obj, "r_twi", &s->r_twi, TYPE_AW_I2C_SUN6I);
> +
> +    object_initialize_child(obj, "wdt", &s->wdt, TYPE_AW_WDT_SUN6I);
>   }
>   
>   static void allwinner_h3_realize(DeviceState *dev, Error **errp)
> @@ -453,6 +456,11 @@ static void allwinner_h3_realize(DeviceState *dev, Error **errp)
>       sysbus_connect_irq(SYS_BUS_DEVICE(&s->r_twi), 0,
>                          qdev_get_gpio_in(DEVICE(&s->gic), AW_H3_GIC_SPI_R_TWI));
>   
> +    /* WDT */
> +    sysbus_realize(SYS_BUS_DEVICE(&s->wdt), &error_fatal);
> +    sysbus_mmio_map_overlap(SYS_BUS_DEVICE(&s->wdt), 0,
> +                            s->memmap[AW_H3_DEV_WDT], 1);

Why do you need to overlap?



  reply	other threads:[~2023-03-13  7:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-11 14:41 [PATCH 0/4] Basic Allwinner WDT emulation Strahinja Jankovic
2023-03-11 14:41 ` [PATCH 1/4] hw/watchdog: Allwinner WDT emulation for system reset Strahinja Jankovic
2023-03-14 21:14   ` Niek Linnenbank
2023-03-15 21:59     ` Strahinja Jankovic
2023-03-11 14:41 ` [PATCH 2/4] hw/arm: Add WDT to Allwinner-A10 and Cubieboard Strahinja Jankovic
2023-03-14 21:21   ` Niek Linnenbank
2023-03-15 22:01     ` Strahinja Jankovic
2023-03-11 14:41 ` [PATCH 3/4] hw/arm: Add WDT to Allwinner-H3 and Orangepi-PC Strahinja Jankovic
2023-03-13  7:53   ` Philippe Mathieu-Daudé [this message]
2023-03-13 15:15     ` Strahinja Jankovic
2023-03-14 21:29   ` Niek Linnenbank
2023-03-11 14:41 ` [PATCH 4/4] tests/avocado: Add reboot tests to Cubieboard Strahinja Jankovic
2023-03-14 20:02   ` Niek Linnenbank

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=a63469d1-e163-43b2-c39c-c3b7c0a6eacc@linaro.org \
    --to=philmd@linaro.org \
    --cc=b.galvani@gmail.com \
    --cc=nieklinnenbank@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=strahinja.p.jankovic@gmail.com \
    --cc=strahinjapjankovic@gmail.com \
    /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).