[PATCH v3 17/20] board: apalis-imx8: initialize snvs
Francesco Dolcini
francesco at dolcini.it
Mon Jan 16 20:05:12 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>
Reviewed-by: Fabio Estevam <festevam at denx.de>
---
v3: added Reviewed-by: Fabio
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 ad0986eebfc1..6b43b5870073 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