fsl-imx6: Add SNVS support for i.MX6 boards
PATCH 1/1 fsl-imx6: Add SNVS support for i.MX6 boards
SNVS is supported on both i.MX6 and i.MX6UL and is needed to support shutdown on the board.
Cc Peter Maydell <[email protected]> (odd fixer:SABRELITE / i.MX6)
Cc Jean-Christophe Dubois <[email protected]> (reviewer:SABRELITE / i.MX6)
Cc [email protected] (open list:SABRELITE / i.MX6)
Cc [email protected] (open list:All patches CC here)
Signed-off-by Vitaly Cheptsov <[email protected]>
--- hw/arm/fsl-imx6.c | 8 ++++++++ include/hw/arm/fsl-imx6.h | 2 ++ 2 files changed, 10 insertions(+)
hw/arm/fsl-imx6.c +8 -0
@@ -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 */
include/hw/arm/fsl-imx6.h +2 -0
@@ -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 ];
Signature · 1 line
2.39.2 (Apple Git-143)
Peter Maydell
AppliedQuoted 10 lines · Vitaly Cheptsov
SNVS is supported on both i.MX6 and i.MX6UL and is needed to support shutdown on the board.
Cc Peter Maydell <[email protected]> (odd fixer:SABRELITE / i.MX6)Cc Jean-Christophe Dubois <[email protected]> (reviewer:SABRELITE / i.MX6)Cc [email protected] (open list:SABRELITE / i.MX6)Cc [email protected] (open list:All patches CC here)Signed-off-by Vitaly Cheptsov <[email protected]>---
Applied to target-arm.next, thanks.
-- PMM