diff mbox

[U-Boot,v3,2/4] omap: enable caches at system start-up

Message ID 1313073345-29773-3-git-send-email-aneesh@ti.com
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Commit Message

Aneesh V Aug. 11, 2011, 2:35 p.m. UTC
Signed-off-by: Aneesh V <aneesh@ti.com>
---
 arch/arm/cpu/armv7/omap3/board.c |    8 ++++++++
 arch/arm/cpu/armv7/omap4/board.c |    8 ++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
index 4aaf97b..2c3d7f3 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/cpu/armv7/omap3/board.c
@@ -402,3 +402,11 @@  void v7_outer_cache_disable(void)
 	omap3_update_aux_cr(0, 0x2);
 }
 #endif
+
+#ifndef CONFIG_SYS_DCACHE_OFF
+void enable_caches(void)
+{
+	/* Enable D-cache. I-cache is already enabled in start.S */
+	dcache_enable();
+}
+#endif
diff --git a/arch/arm/cpu/armv7/omap4/board.c b/arch/arm/cpu/armv7/omap4/board.c
index 5943d61..8f7c375 100644
--- a/arch/arm/cpu/armv7/omap4/board.c
+++ b/arch/arm/cpu/armv7/omap4/board.c
@@ -299,3 +299,11 @@  void v7_outer_cache_disable(void)
 	set_pl310_ctrl_reg(0);
 }
 #endif
+
+#ifndef CONFIG_SYS_DCACHE_OFF
+void enable_caches(void)
+{
+	/* Enable D-cache. I-cache is already enabled in start.S */
+	dcache_enable();
+}
+#endif