qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Francisco Iglesias <frasse.iglesias@gmail.com>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Andrew Jeffery" <andrew@aj.id.au>,
	qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	"Joel Stanley" <joel@jms.id.au>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH v2 1/5] aspeed/wdt: Introduce a container for the MMIO region
Date: Thu, 21 Oct 2021 09:25:26 +0200	[thread overview]
Message-ID: <20211021072525.GG23846@fralle-msi> (raw)
In-Reply-To: <20211018132609.160008-2-clg@kaod.org>

On [2021 Oct 18] Mon 15:26:05, Cédric Le Goater wrote:
> On the AST2600, the 2nd watchdog timer can be controlled through the
> FMC controller to disable the alternate boot function. Next changes
> will map the WDT2 registers in the AST2600 FMC memory region. Add a
> container on top of the register region for this purpose.
> 
> Signed-off-by: Cédric Le Goater <clg@kaod.org>

Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com>

> ---
>  include/hw/watchdog/wdt_aspeed.h | 1 +
>  hw/watchdog/wdt_aspeed.c         | 6 +++++-
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/include/hw/watchdog/wdt_aspeed.h b/include/hw/watchdog/wdt_aspeed.h
> index f945cd6c5833..14e91acb1284 100644
> --- a/include/hw/watchdog/wdt_aspeed.h
> +++ b/include/hw/watchdog/wdt_aspeed.h
> @@ -28,6 +28,7 @@ struct AspeedWDTState {
>      QEMUTimer *timer;
>  
>      /*< public >*/
> +    MemoryRegion iomem_container;
>      MemoryRegion iomem;
>      uint32_t regs[ASPEED_WDT_REGS_MAX];
>  
> diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c
> index 146ffcd71301..803e861a9c61 100644
> --- a/hw/watchdog/wdt_aspeed.c
> +++ b/hw/watchdog/wdt_aspeed.c
> @@ -275,9 +275,13 @@ static void aspeed_wdt_realize(DeviceState *dev, Error **errp)
>       */
>      s->pclk_freq = PCLK_HZ;
>  
> +    memory_region_init(&s->iomem_container, OBJECT(s),
> +                       TYPE_ASPEED_WDT ".container", ASPEED_WDT_REGS_MAX * 4);
> +    sysbus_init_mmio(sbd, &s->iomem_container);
> +
>      memory_region_init_io(&s->iomem, OBJECT(s), &aspeed_wdt_ops, s,
>                            TYPE_ASPEED_WDT, ASPEED_WDT_REGS_MAX * 4);
> -    sysbus_init_mmio(sbd, &s->iomem);
> +    memory_region_add_subregion(&s->iomem_container, 0x0, &s->iomem);
>  }
>  
>  static Property aspeed_wdt_properties[] = {
> -- 
> 2.31.1
> 
> 


  parent reply	other threads:[~2021-10-21  7:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 13:26 [PATCH v2 0/5] aspeed/smc: Improve support for the alternate boot function Cédric Le Goater
2021-10-18 13:26 ` [PATCH v2 1/5] aspeed/wdt: Introduce a container for the MMIO region Cédric Le Goater
2021-10-20 21:57   ` Philippe Mathieu-Daudé
2021-10-21  7:25   ` Francisco Iglesias [this message]
2021-10-18 13:26 ` [PATCH v2 2/5] aspeed: Initialize the watchdog device models before the FMC models Cédric Le Goater
2021-10-20 21:58   ` Philippe Mathieu-Daudé
2021-10-21  7:25   ` Francisco Iglesias
2021-10-18 13:26 ` [PATCH v2 3/5] aspeed/smc: Improve support for the alternate boot function Cédric Le Goater
2021-10-18 13:26 ` [PATCH v2 4/5] aspeed/smc: Use a container for the flash mmio address space Cédric Le Goater
2021-10-20 22:00   ` Philippe Mathieu-Daudé
2021-10-21  7:26   ` Francisco Iglesias
2021-10-18 13:26 ` [PATCH v2 5/5] speed/sdhci: Add trace events Cédric Le Goater
2021-10-20 22:01   ` Philippe Mathieu-Daudé
2021-10-20 22:34   ` Francisco Iglesias
2021-10-20  4:57 ` [PATCH v2 0/5] aspeed/smc: Improve support for the alternate boot function Peter Delevoryas
2021-10-20  8:26   ` Cédric Le Goater
2021-10-22  6:11     ` Cédric Le Goater
2021-10-22  7:05       ` Peter Delevoryas

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=20211021072525.GG23846@fralle-msi \
    --to=frasse.iglesias@gmail.com \
    --cc=andrew@aj.id.au \
    --cc=clg@kaod.org \
    --cc=joel@jms.id.au \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --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).