[PATCH v1 2/2] board: colibri-imx8x: initialize snvs

Andrejs Cainikovs andrejs.cainikovs at gmail.com
Mon Apr 3 13:14:26 CEST 2023


Initialize Secure Non-Volatile Storage, aka SNVS.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs at toradex.com>
---
 board/toradex/colibri-imx8x/colibri-imx8x.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c
index 4f4d45fe0f3..03fc88a54bd 100644
--- a/board/toradex/colibri-imx8x/colibri-imx8x.c
+++ b/board/toradex/colibri-imx8x/colibri-imx8x.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>
@@ -139,6 +140,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.34.1



More information about the U-Boot mailing list