* [U-Boot] [RFC][PATCH 16/19] arm926: flush cache for arm926
@ 2010-07-29 10:45 Heiko Schocher
0 siblings, 0 replies; only message in thread
From: Heiko Schocher @ 2010-07-29 10:45 UTC (permalink / raw)
To: u-boot
This simple adds the cache flush for arm926. Most likely
the same works for other families, like arm920t, but I didn't
check as this is currently just an RFC.
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
---
arch/arm/lib/cache.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 61ee9d3..b36fd24 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -32,5 +32,11 @@ void flush_cache (unsigned long dummy1, unsigned long dummy2)
arm1136_cache_flush();
#endif
+#ifdef CONFIG_ARM926EJS
+ /* test and clean, page 2-23 of arm926ejs manual */
+ asm("0: mrc p15, 0, r15, c7, c10, 3\n\t" "bne 0b\n" : : : "memory");
+ /* disable write buffer as well (page 2-22) */
+ asm("mcr p15, 0, %0, c7, c10, 4" : : "r" (0));
+#endif
return;
}
--
1.6.2.5
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-29 10:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-29 10:45 [U-Boot] [RFC][PATCH 16/19] arm926: flush cache for arm926 Heiko Schocher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox