diff options
-rw-r--r-- | arch/arm/cpu/armv7/mx7ulp/clock.c | 10 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/mx7ulp/soc.c | 8 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-mx7ulp/clock.h | 3 | ||||
-rw-r--r-- | include/configs/mx7ulp_evk.h | 9 |
4 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx7ulp/clock.c b/arch/arm/cpu/armv7/mx7ulp/clock.c index 3803204..0f3e2b3 100644 --- a/arch/arm/cpu/armv7/mx7ulp/clock.c +++ b/arch/arm/cpu/armv7/mx7ulp/clock.c @@ -298,6 +298,16 @@ void clock_init(void) enable_usboh3_clk(1); } +#ifdef CONFIG_SECURE_BOOT +void hab_caam_clock_enable(unsigned char enable) +{ + if (enable) + pcc_clock_enable(PER_CLK_CAAM, true); + else + pcc_clock_enable(PER_CLK_CAAM, false); +} +#endif + /* * Dump some core clockes. */ diff --git a/arch/arm/cpu/armv7/mx7ulp/soc.c b/arch/arm/cpu/armv7/mx7ulp/soc.c index 04b98a0..4c77e84 100644 --- a/arch/arm/cpu/armv7/mx7ulp/soc.c +++ b/arch/arm/cpu/armv7/mx7ulp/soc.c @@ -9,6 +9,7 @@ #include <asm/sections.h> #include <asm/arch/sys_proto.h> #include <dm.h> +#include <asm/imx-common/hab.h> struct lpuart_serial_platdata { void *reg; @@ -23,6 +24,13 @@ U_BOOT_DEVICE(mx7ulp_lpuart) = { .platdata = &mx7ulp_lpuart_data, }; +#if defined(CONFIG_SECURE_BOOT) +struct imx_sec_config_fuse_t const imx_sec_config_fuse = { + .bank = 29, + .word = 6, +}; +#endif + static char *get_reset_cause(char *); u32 get_cpu_rev(void) diff --git a/arch/arm/include/asm/arch-mx7ulp/clock.h b/arch/arm/include/asm/arch-mx7ulp/clock.h index 6da76a2..92d8b21 100644 --- a/arch/arm/include/asm/arch-mx7ulp/clock.h +++ b/arch/arm/include/asm/arch-mx7ulp/clock.h @@ -37,6 +37,9 @@ void enable_ocotp_clk(unsigned char enable); #ifdef CONFIG_USB_EHCI void enable_usboh3_clk(unsigned char enable); #endif +#ifdef CONFIG_SECURE_BOOT +void hab_caam_clock_enable(unsigned char enable); +#endif void init_clk_usdhc(u32 index); void clock_init(void); #endif diff --git a/include/configs/mx7ulp_evk.h b/include/configs/mx7ulp_evk.h index af0cce0..054751b 100644 --- a/include/configs/mx7ulp_evk.h +++ b/include/configs/mx7ulp_evk.h @@ -15,6 +15,15 @@ /*Uncomment it to use plugin boot*/ /*#define CONFIG_USE_PLUGIN*/ +/*Uncomment it to use secure boot*/ +/*#define CONFIG_SECURE_BOOT*/ + +#ifdef CONFIG_SECURE_BOOT +#ifndef CONFIG_CSF_SIZE +#define CONFIG_CSF_SIZE 0x4000 +#endif +#endif + #define CONFIG_SYS_VSNPRINTF #define CONFIG_BOARD_POSTCLK_INIT #define CONFIG_IMX_FIXED_IVT_OFFSET |