summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/mx6/soc.c
diff options
context:
space:
mode:
authorNitin Garg <nitin.garg@freescale.com>2014-05-27 08:37:44 -0500
committerNitin Garg <nitin.garg@freescale.com>2014-05-27 08:37:44 -0500
commit0802947cfb94789cdb6b8a402a7c4523549c2a12 (patch)
treef7db7449e67346b334cc87573134dafe9d40b00b /arch/arm/cpu/armv7/mx6/soc.c
parentb3b8da14c9469551991b09e24520eeed8240bafe (diff)
downloadu-boot-imx-0802947cfb94789cdb6b8a402a7c4523549c2a12.zip
u-boot-imx-0802947cfb94789cdb6b8a402a7c4523549c2a12.tar.gz
u-boot-imx-0802947cfb94789cdb6b8a402a7c4523549c2a12.tar.bz2
ENGR00315499-3: Support i.MX6 HAB authentication of kernel image
Support HAB authentication of kernel or secondary images via bootm or hab_auth_img u-boot command. Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Diffstat (limited to 'arch/arm/cpu/armv7/mx6/soc.c')
-rw-r--r--arch/arm/cpu/armv7/mx6/soc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index b29973f..c5f3b22 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -377,10 +377,25 @@ int board_postclk_init(void)
#ifndef CONFIG_SYS_DCACHE_OFF
void enable_caches(void)
{
+#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH)
+ enum dcache_option option = DCACHE_WRITETHROUGH;
+#else
+ enum dcache_option option = DCACHE_WRITEBACK;
+#endif
+
/* Avoid random hang when download by usb */
invalidate_dcache_all();
+
/* Enable D-cache. I-cache is already enabled in start.S */
dcache_enable();
+
+ /* Enable caching on OCRAM and ROM */
+ mmu_set_region_dcache_behaviour(ROMCP_ARB_BASE_ADDR,
+ ROMCP_ARB_END_ADDR,
+ option);
+ mmu_set_region_dcache_behaviour(IRAM_BASE_ADDR,
+ IRAM_SIZE,
+ option);
}
#endif