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-04-25 07:54:08 -0600
commitb50828854144e64514bbf2a8663ec920f4ccc683 (patch)
tree57fecd3c8cb23ada52f9f78f48d4161971ec923a
parent18d3f0652f6fbaee4e99cb89b5b67bf2ccb6b50f (diff)
downloadu-boot-linaro-stable-b50828854144e64514bbf2a8663ec920f4ccc683.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;
}