]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: colibri-imx8x: initialize snvs
authorAndrejs Cainikovs <andrejs.cainikovs@gmail.com>
Mon, 3 Apr 2023 11:14:26 +0000 (13:14 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 13 Jul 2023 09:29:40 +0000 (11:29 +0200)
Initialize Secure Non-Volatile Storage, aka SNVS.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
board/toradex/colibri-imx8x/colibri-imx8x.c

index f504385aec9b40f278ddfbdd618ec65528f3a5cd..6c0b09787c8b267f1ce60a1a43347c3e62f748ea 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/arch/imx8-pins.h>
 #include <asm/arch/iomux.h>
 #include <firmware/imx/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;
 }