Skip to contentSkip to conversation

ARM: mx6: make CAAM usable on the i.MX6 boards

PATCH New Heinrich Schuchardt 2 participants 2 messages Jun 26, 2020 – Jul 16, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mx6: make CAAM usable on the i.MX6 boards

Even if the HAB fuse is not set we want to be able to use the Cryptographic Accelerator and Assurance Module (CAAM) for generating random numbers. So SYS_FSL_HAS_SEC should be selected even if IMX_HAB is not set.

arch_misc_init() has to be called to initialize the CAAM.

---
 arch/arm/Kconfig            |  2 +-
 arch/arm/mach-imx/mx6/soc.c | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
arch/arm/Kconfig +1 -1
index 54d65f8488..9a957f63c7 100644
@@ -884,7 +884,7 @@ config ARCH_MX7
 config ARCH_MX6
 	bool "Freescale MX6"
 	select CPU_V7A
-	select SYS_FSL_HAS_SEC if IMX_HAB
+	select SYS_FSL_HAS_SEC
 	select SYS_FSL_SEC_COMPAT_4
 	select SYS_FSL_SEC_LE
 	imply MXC_GPIO
arch/arm/mach-imx/mx6/soc.c +10 -0
index 19ca382649..e129286065 100644
@@ -22,6 +22,7 @@
 #include <asm/arch/mxc_hdmi.h>
 #include <asm/arch/crm_regs.h>
 #include <dm.h>
+#include <fsl_sec.h>
 #include <imx_thermal.h>
 #include <mmc.h>
 
@@ -691,6 +692,15 @@ void imx_setup_hdmi(void)
 }
 #endif
 
+#ifdef CONFIG_ARCH_MISC_INIT
+int arch_misc_init(void)
+{
+#ifdef CONFIG_FSL_CAAM
+	sec_init();
+#endif
+	return 0;
+}
+#endif
 
 /*
  * gpr_init() function is common for boards using MX6S, MX6DL, MX6D,

--
2.20.1

#1 lore raw

PATCH 1/1 ARM: mx6: make CAAM usable on the i.MX6 boards

Quoted 5 lines

Even if the HAB fuse is not set we want to be able to use the Cryptographic Accelerator and Assurance Module (CAAM) for generating random numbers. So SYS_FSL_HAS_SEC should be selected even if IMX_HAB is not set. arch_misc_init() has to be called to initialize the CAAM.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================