From a509161a21ef7584d614dc1530a2756dcfb217e0 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 23 Mar 2015 00:07:32 +0900 Subject: ARM: UniPhier: disable L2 cache by lowlevel_init of U-Boot proper The L2 cache is used as a temporary SRAM on SPL. Now the secondary CPUs store the necessary code for jumping to Linux on their L1 I-caches. So, the L2 cache can be disabled much earlier, at the very entry of U-Boot proper (lowlevel_init). This makes the boot sequence clearer. Also, as the L1 cache has been disabled by the start.S, enable_caches() does not need to do it again. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/cache_uniphier.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'arch/arm/mach-uniphier/cache_uniphier.c') diff --git a/arch/arm/mach-uniphier/cache_uniphier.c b/arch/arm/mach-uniphier/cache_uniphier.c index 4bf01bce3e..c1e9164489 100644 --- a/arch/arm/mach-uniphier/cache_uniphier.c +++ b/arch/arm/mach-uniphier/cache_uniphier.c @@ -122,23 +122,6 @@ void v7_outer_cache_disable(void) void enable_caches(void) { - uint32_t reg; - - /* - * UniPhier SoCs must use L2 cache for init stack pointer. - * We disable L2 and L1 in this order. - * If CONFIG_SYS_DCACHE_OFF is not defined, - * caches are enabled again with a new page table. - */ - - /* L2 disable */ - v7_outer_cache_disable(); - - /* L1 disable */ - reg = get_cr(); - reg &= ~(CR_C | CR_M); - set_cr(reg); - #ifndef CONFIG_SYS_DCACHE_OFF dcache_enable(); #endif -- cgit v1.2.1