summaryrefslogtreecommitdiff
path: root/arch/arm/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r--arch/arm/cpu/armv7/mx7/clock.c12
-rw-r--r--arch/arm/cpu/armv7/mx7/hab.c4
2 files changed, 7 insertions, 9 deletions
diff --git a/arch/arm/cpu/armv7/mx7/clock.c b/arch/arm/cpu/armv7/mx7/clock.c
index 6298485..79a8e75 100644
--- a/arch/arm/cpu/armv7/mx7/clock.c
+++ b/arch/arm/cpu/armv7/mx7/clock.c
@@ -1073,14 +1073,12 @@ void clock_init(void)
}
#ifdef CONFIG_SECURE_BOOT
-void hab_caam_clock_enable(void)
+void hab_caam_clock_enable(unsigned char enable)
{
- clock_enable(CCGR_CAAM, 1);
-}
-
-void hab_caam_clock_disable(void)
-{
- clock_enable(CCGR_CAAM, 0);
+ if (enable)
+ clock_enable(CCGR_CAAM, 1);
+ else
+ clock_enable(CCGR_CAAM, 0);
}
#endif
diff --git a/arch/arm/cpu/armv7/mx7/hab.c b/arch/arm/cpu/armv7/mx7/hab.c
index ae9591b..43b06bd 100644
--- a/arch/arm/cpu/armv7/mx7/hab.c
+++ b/arch/arm/cpu/armv7/mx7/hab.c
@@ -186,7 +186,7 @@ uint32_t authenticate_image(uint32_t ddr_start, uint32_t image_size)
printf("\nAuthenticate uImage from DDR location 0x%x...\n",
ddr_start);
- hab_caam_clock_enable();
+ hab_caam_clock_enable(1);
if (hab_rvt_entry() == HAB_SUCCESS) {
/* If not already aligned, Align to ALIGN_SIZE */
@@ -222,7 +222,7 @@ uint32_t authenticate_image(uint32_t ddr_start, uint32_t image_size)
} else
printf("hab entry function fail\n");
- hab_caam_clock_disable();
+ hab_caam_clock_enable(0);
get_hab_status();
}