public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ARM: pantheon: enable dcache by default
@ 2011-10-05 15:13 Lei Wen
  2011-10-07  3:53 ` Prafulla Wadaskar
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Lei Wen @ 2011-10-05 15:13 UTC (permalink / raw)
  To: u-boot

Marvell 88SV331xV5 has its specific arm cp15 opcode, which could
flush out whole dcache by only one line of asm code.

Signed-off-by: Lei Wen <leiwen@marvell.com>
---
 arch/arm/cpu/arm926ejs/pantheon/cpu.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/pantheon/cpu.c b/arch/arm/cpu/arm926ejs/pantheon/cpu.c
index 2d9c13a..8f94ea9 100644
--- a/arch/arm/cpu/arm926ejs/pantheon/cpu.c
+++ b/arch/arm/cpu/arm926ejs/pantheon/cpu.c
@@ -105,3 +105,17 @@ void i2c_clk_enable(void)
 {
 }
 #endif
+
+#ifndef CONFIG_SYS_DCACHE_OFF
+void enable_caches(void)
+{
+	/* Enable D-cache. I-cache is already enabled in start.S */
+	dcache_enable();
+}
+
+void  flush_cache(unsigned long start, unsigned long size)
+{
+	/* clean & invalidate all D cache */
+	asm("mcr p15, 0, %0, c7, c14, 0" : : "r" (0));
+}
+#endif
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-11-09  5:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-05 15:13 [U-Boot] [PATCH] ARM: pantheon: enable dcache by default Lei Wen
2011-10-07  3:53 ` Prafulla Wadaskar
2011-10-08 14:01   ` Lei Wen
2011-10-08 13:59 ` [U-Boot] [PATCH 0/3] enable dcache for pantheon and armada100 Lei Wen
2011-10-18 15:02   ` Lei Wen
2011-11-08 20:07     ` Albert ARIBAUD
2011-11-09  5:30       ` Prafulla Wadaskar
2011-10-08 13:59 ` [U-Boot] [PATCH 1/3] ARM: add special dcache flush op code for 88SV331xV5 Lei Wen
2011-10-08 13:59 ` [U-Boot] [PATCH 2/3] ARM: pantheon: enable dcache by default Lei Wen
2011-10-08 13:59 ` [U-Boot] [PATCH 3/3] ARM: armada100: " Lei Wen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox