From: mathieu.poirier at linaro.org Date: Tue, 19 Jun 2012 09:33:54 -0600 Subject: [U-Boot] [PATCH 10/11 v2] armv7: Adding cpu specific cache managmenent In-Reply-To: <1340120034-15694-1-git-send-email-mathieu.poirier@linaro.org> References: <1340120034-15694-1-git-send-email-mathieu.poirier@linaro.org> Message-ID: <1340120034-15694-4-git-send-email-mathieu.poirier@linaro.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: "Mathieu J. Poirier" Some CPU (i.e u8500) need more cache management before launching the Linux kernel. Signed-off-by: Mathieu Poirier Signed-off-by: John Rigby --- Changes for v2: - Moved from __attribute__(...) to __weak. --- arch/arm/cpu/armv7/cpu.c | 8 ++++++++ 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..cc46328 100644 --- a/arch/arm/cpu/armv7/cpu.c +++ b/arch/arm/cpu/armv7/cpu.c @@ -36,6 +36,7 @@ #include #include #include +#include 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_management(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_management(); + return 0; } -- 1.7.5.4