aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPer Forlin <per.forlin@linaro.org>2011-08-31 13:24:03 +0200
committerJohn Rigby <john.rigby@linaro.org>2012-05-02 19:44:08 -0600
commit9de880faa5c3c343f1baef23c4ebc0cad19182ad (patch)
treeee1c852d7b7b026cb4ff0f02156b2dd8c0086bf6
parent5011670fdcf64802ad0d2ed18aaea91a18bdd1c7 (diff)
downloadu-boot-linaro-stable-9de880faa5c3c343f1baef23c4ebc0cad19182ad.tar.gz
snowball: arm cpu: inv and clean of L2
TODO: make this patch board specific. E.g add a board hook in cpu.c that the board may implement. Use generic cache functions for clean and inv, not hardcoded registers.
-rw-r--r--arch/arm/cpu/armv7/cpu.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c
index c6fa8ef13..76d6448db 100644
--- a/arch/arm/cpu/armv7/cpu.c
+++ b/arch/arm/cpu/armv7/cpu.c
@@ -80,6 +80,13 @@ int cleanup_before_linux(void)
* problems for kernel
*/
invalidate_dcache_all();
-
+#ifdef CONFIG_U8500
+ /* Clean l2 */
+ *((volatile unsigned int *)(0xA04127BC)) = 0xFF;
+ while (*((volatile unsigned int *)(0xA04127BC)) & 0xFF);
+ /* Invalidate l2 */
+ *((volatile unsigned int *)(0xA041277C)) = 0xFF;
+ while (*((volatile unsigned int *)(0xA041277C)) & 0xFF);
+#endif
return 0;
}