[PATCH] omap3: workaround for omap3 cache issue

a0393566local (none) a0393566local at ula0393566.
Thu Sep 29 20:28:13 CEST 2011


Signed-off-by: None <None>
---
 arch/arm/cpu/armv7/cache_v7.c    |   18 ++++++++----------
 arch/arm/cpu/armv7/omap3/board.c |    4 ++--
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
index 1b4e808..6907ff6 100644
--- a/arch/arm/cpu/armv7/cache_v7.c
+++ b/arch/arm/cpu/armv7/cache_v7.c
@@ -248,13 +248,6 @@ static void v7_inval_tlb(void)
 	CP15ISB;
 }
 
-void invalidate_dcache_all(void)
-{
-	v7_maint_dcache_all(ARMV7_DCACHE_INVAL_ALL);
-
-	v7_outer_cache_inval_all();
-}
-
 /*
  * Performs a clean & invalidation of the entire data cache
  * at all levels
@@ -306,9 +299,6 @@ void  flush_cache(unsigned long start, unsigned long size)
 	flush_dcache_range(start, start + size);
 }
 #else /* #ifndef CONFIG_SYS_DCACHE_OFF */
-void invalidate_dcache_all(void)
-{
-}
 
 void flush_dcache_all(void)
 {
@@ -356,6 +346,14 @@ void invalidate_icache_all(void)
 }
 #endif
 
+
+void invalidate_dcache_all(void)
+{
+	v7_maint_dcache_all(ARMV7_DCACHE_INVAL_ALL);
+
+	omap3_invalidate_l2_cache_secure();
+}
+
 /*
  * Stub implementations for outer cache operations
  */
diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
index 0448bc9..7221f5a 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/cpu/armv7/omap3/board.c
@@ -360,9 +360,8 @@ static void omap3_setup_aux_cr(void)
 	omap3_update_aux_cr_secure(0xE0, 0);
 }
 
-#ifndef CONFIG_SYS_L2CACHE_OFF
 /* Invalidate the entire L2 cache from secure mode */
-static void omap3_invalidate_l2_cache_secure(void)
+void omap3_invalidate_l2_cache_secure(void)
 {
 	if (get_device_type() == GP_DEVICE) {
 		omap3_gp_romcode_call(OMAP3_GP_ROMCODE_API_L2_INVAL,
@@ -376,6 +375,7 @@ static void omap3_invalidate_l2_cache_secure(void)
 	}
 }
 
+#ifndef CONFIG_SYS_L2CACHE_OFF
 void v7_outer_cache_enable(void)
 {
 	/* Set L2EN */
-- 
1.7.1


--------------020304080806060706000703--


More information about the U-Boot mailing list