summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu J. Poirier <mathieu.poirier@linaro.org>2012-07-31 08:59:32 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-09-01 14:58:20 +0200
commit53e6f6a6340adba6ff2a970ff27ac741901a8776 (patch)
tree76c2fc98f0f166e7892c006f35f458e4538f96e2
parent10ed93dcddeede4e305235367c402fb99e063ef3 (diff)
downloadu-boot-imx-53e6f6a6340adba6ff2a970ff27ac741901a8776.zip
u-boot-imx-53e6f6a6340adba6ff2a970ff27ac741901a8776.tar.gz
u-boot-imx-53e6f6a6340adba6ff2a970ff27ac741901a8776.tar.bz2
armv7: Adding cpu specific cache managmenent
Some CPU (i.e u8500) need more cache management before launching the Linux kernel. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: John Rigby <john.rigby@linaro.org>
-rw-r--r--arch/arm/cpu/armv7/cpu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c
index c6fa8ef..f01989f 100644
--- a/arch/arm/cpu/armv7/cpu.c
+++ b/arch/arm/cpu/armv7/cpu.c
@@ -36,6 +36,7 @@
#include <asm/system.h>
#include <asm/cache.h>
#include <asm/armv7.h>
+#include <linux/compiler.h>
void save_boot_params_default(u32 r0, u32 r1, u32 r2, u32 r3)
{
@@ -44,6 +45,8 @@ void save_boot_params_default(u32 r0, u32 r1, u32 r2, u32 r3)
void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3)
__attribute__((weak, alias("save_boot_params_default")));
+void __weak cpu_cache_initialization(void){}
+
int cleanup_before_linux(void)
{
/*
@@ -81,5 +84,10 @@ int cleanup_before_linux(void)
*/
invalidate_dcache_all();
+ /*
+ * Some CPU need more cache attention before starting the kernel.
+ */
+ cpu_cache_initialization();
+
return 0;
}