qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fsl-imx6: Add SNVS support for i.MX6 boards
@ 2023-05-15  9:50 Vitaly Cheptsov
  2023-05-23 13:46 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Vitaly Cheptsov @ 2023-05-15  9:50 UTC (permalink / raw)
  To: qemu-devel
  Cc: Vitaly Cheptsov, Peter Maydell, Jean-Christophe Dubois, qemu-arm

SNVS is supported on both i.MX6 and i.MX6UL and is needed
to support shutdown on the board.

Cc: Peter Maydell <peter.maydell@linaro.org> (odd fixer:SABRELITE / i.MX6)
Cc: Jean-Christophe Dubois <jcd@tribudubois.net> (reviewer:SABRELITE / i.MX6)
Cc: qemu-arm@nongnu.org (open list:SABRELITE / i.MX6)
Cc: qemu-devel@nongnu.org (open list:All patches CC here)
Signed-off-by: Vitaly Cheptsov <cheptsov@ispras.ru>
---
 hw/arm/fsl-imx6.c         | 8 ++++++++
 include/hw/arm/fsl-imx6.h | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c
index 00dafe3f62..4fa7f0b95e 100644
--- a/hw/arm/fsl-imx6.c
+++ b/hw/arm/fsl-imx6.c
@@ -53,6 +53,8 @@ static void fsl_imx6_init(Object *obj)
 
     object_initialize_child(obj, "src", &s->src, TYPE_IMX6_SRC);
 
+    object_initialize_child(obj, "snvs", &s->snvs, TYPE_IMX7_SNVS);
+
     for (i = 0; i < FSL_IMX6_NUM_UARTS; i++) {
         snprintf(name, NAME_SIZE, "uart%d", i + 1);
         object_initialize_child(obj, name, &s->uart[i], TYPE_IMX_SERIAL);
@@ -390,6 +392,12 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp)
                        qdev_get_gpio_in(DEVICE(&s->a9mpcore),
                                         FSL_IMX6_ENET_MAC_1588_IRQ));
 
+    /*
+     * SNVS
+     */
+    sysbus_realize(SYS_BUS_DEVICE(&s->snvs), &error_abort);
+    sysbus_mmio_map(SYS_BUS_DEVICE(&s->snvs), 0, FSL_IMX6_SNVSHP_ADDR);
+
     /*
      * Watchdog
      */
diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h
index 83291457cf..5b4d48da08 100644
--- a/include/hw/arm/fsl-imx6.h
+++ b/include/hw/arm/fsl-imx6.h
@@ -21,6 +21,7 @@
 #include "hw/cpu/a9mpcore.h"
 #include "hw/misc/imx6_ccm.h"
 #include "hw/misc/imx6_src.h"
+#include "hw/misc/imx7_snvs.h"
 #include "hw/watchdog/wdt_imx2.h"
 #include "hw/char/imx_serial.h"
 #include "hw/timer/imx_gpt.h"
@@ -59,6 +60,7 @@ struct FslIMX6State {
     A9MPPrivState  a9mpcore;
     IMX6CCMState   ccm;
     IMX6SRCState   src;
+    IMX7SNVSState  snvs;
     IMXSerialState uart[FSL_IMX6_NUM_UARTS];
     IMXGPTState    gpt;
     IMXEPITState   epit[FSL_IMX6_NUM_EPITS];
-- 
2.39.2 (Apple Git-143)



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fsl-imx6: Add SNVS support for i.MX6 boards
  2023-05-15  9:50 [PATCH] fsl-imx6: Add SNVS support for i.MX6 boards Vitaly Cheptsov
@ 2023-05-23 13:46 ` Peter Maydell
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2023-05-23 13:46 UTC (permalink / raw)
  To: Vitaly Cheptsov; +Cc: qemu-devel, Jean-Christophe Dubois, qemu-arm

On Mon, 15 May 2023 at 10:50, Vitaly Cheptsov <cheptsov@ispras.ru> wrote:
>
> SNVS is supported on both i.MX6 and i.MX6UL and is needed
> to support shutdown on the board.
>
> Cc: Peter Maydell <peter.maydell@linaro.org> (odd fixer:SABRELITE / i.MX6)
> Cc: Jean-Christophe Dubois <jcd@tribudubois.net> (reviewer:SABRELITE / i.MX6)
> Cc: qemu-arm@nongnu.org (open list:SABRELITE / i.MX6)
> Cc: qemu-devel@nongnu.org (open list:All patches CC here)
> Signed-off-by: Vitaly Cheptsov <cheptsov@ispras.ru>
> ---



Applied to target-arm.next, thanks.

-- PMM


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-23 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-15  9:50 [PATCH] fsl-imx6: Add SNVS support for i.MX6 boards Vitaly Cheptsov
2023-05-23 13:46 ` Peter Maydell

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).