[PATCH v2 19/22] board: apalis-imx8: initialize snvs

Francesco Dolcini francesco at dolcini.it
Fri Jan 13 18:17:48 CET 2023


From: Andrejs Cainikovs <andrejs.cainikovs at toradex.com>

Initialize Secure Non-Volatile Storage, aka SNVS.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs at toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini at toradex.com>
---
v2: new patch
---
 board/toradex/apalis-imx8/apalis-imx8.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c
index d24e1b8d174e..11a48a3ff420 100644
--- a/board/toradex/apalis-imx8/apalis-imx8.c
+++ b/board/toradex/apalis-imx8/apalis-imx8.c
@@ -12,6 +12,7 @@
 #include <asm/arch/imx8-pins.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/sci/sci.h>
+#include <asm/arch/snvs_security_sc.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
@@ -290,6 +291,13 @@ int board_init(void)
 {
 	board_gpio_init();
 
+	if (IS_ENABLED(CONFIG_IMX_SNVS_SEC_SC_AUTO)) {
+		int ret = snvs_security_sc_init();
+
+		if (ret)
+			return ret;
+	}
+
 	return 0;
 }
 
-- 
2.25.1



More information about the U-Boot mailing list