summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/mx7
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-04-28 11:17:51 +0800
committerPeng Fan <Peng.Fan@freescale.com>2015-04-29 15:10:28 +0800
commitd5aaf9708b832da56cb5ec8d824a60fc9fda5480 (patch)
tree84c6030f19b1aa9099d9bf5e55c262f8717a9438 /arch/arm/cpu/armv7/mx7
parentbbddb98393e3ae1a35d50db4a7269a184ea1db96 (diff)
downloadu-boot-imx-d5aaf9708b832da56cb5ec8d824a60fc9fda5480.zip
u-boot-imx-d5aaf9708b832da56cb5ec8d824a60fc9fda5480.tar.gz
u-boot-imx-d5aaf9708b832da56cb5ec8d824a60fc9fda5480.tar.bz2
MLK-10774-48 imx: mx7 update hab_caam_clock_enable
Merge hab_caam_clock_enable and hab_caam_clock_disable into one function Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Diffstat (limited to 'arch/arm/cpu/armv7/mx7')
-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();
}