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-07 10:07:26 -0600
commitd771aa30e692ae1b85785ffda7b032c7cb630d7c (patch)
treea13b7450718795be9741eb93190dfae638bd4af9
parentc7ce163c9dcbbb9271cecae418eb1f24ac086305 (diff)
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;
}