[PATCH 2/2] arm: mach-imx: imx8m: re-use SNVS init routine

Ian Ray ian.ray at gehealthcare.com
Fri Nov 8 12:10:51 CET 2024


Allow unpriv access to SNVS LP for imx8m and imx8mp.

Signed-off-by: Ian Ray <ian.ray at gehealthcare.com>
---
 arch/arm/mach-imx/Makefile    | 2 +-
 arch/arm/mach-imx/imx8m/soc.c | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 0de207c068..011cca5d97 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -294,4 +294,4 @@ obj-$(CONFIG_ARCH_IMXRT) += imxrt/
 obj-$(CONFIG_SPL_BOOTROM_SUPPORT) += spl_imx_romapi.o
 obj-$(CONFIG_IMX8_ROMAPI) += romapi.o
 
-obj-$(CONFIG_MX7) += snvs.o
+obj-$(CONFIG_MX7)$(CONFIG_IMX8M) += snvs.o
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index a72329ea91..459503b0d6 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -34,6 +34,8 @@
 #include <linux/bitfield.h>
 #include <linux/sizes.h>
 
+#include "../snvs.h"
+
 DECLARE_GLOBAL_DATA_PTR;
 
 #if defined(CONFIG_IMX_HAB)
@@ -571,6 +573,8 @@ static void imx8m_setup_snvs(void)
 	writel(SNVS_LPPGDR_INIT, SNVS_BASE_ADDR + SNVS_LPLVDR);
 	/* Clear interrupt status */
 	writel(0xffffffff, SNVS_BASE_ADDR + SNVS_LPSR);
+
+	init_snvs();
 }
 
 static void imx8m_setup_csu_tzasc(void)
-- 
2.39.5



More information about the U-Boot mailing list