From: John Jacques <john.jacq...@lsi.com>

In some cases, the boot loader will leave the L3 cache in
SFONLY mode.  This is required because the early fixup
code in arch/arm/boot/compressed does not flush L3 cache.
This commit causes Linux to enable the L3 cache in the
arch/arm/mach-axxia startup code.

Signed-off-by: John Jacques <john.jacq...@lsi.com>
---
 arch/arm/mach-axxia/axxia.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-axxia/axxia.c b/arch/arm/mach-axxia/axxia.c
index 40b4186ca..a0b3532 100644
--- a/arch/arm/mach-axxia/axxia.c
+++ b/arch/arm/mach-axxia/axxia.c
@@ -63,9 +63,6 @@ static const char *axxia_dt_match[] __initconst = {
 };
 
 static void __iomem *base;
-
-#ifdef CONFIG_KEXEC
-
 static void __iomem *dickens;
 
 static void set_l3_pstate(u32 newstate)
@@ -95,14 +92,12 @@ static void set_l3_pstate(u32 newstate)
 static void
 flush_l3(void)
 {
-       /* Shutdown to flush */
-       set_l3_pstate(0);
+       /* Switch to SFONLY to flush */
+       set_l3_pstate(1);
        /* ...and then back up again */
        set_l3_pstate(3);
 }
 
-#endif
-
 static struct map_desc axxia_static_mappings[] __initdata = {
 #ifdef CONFIG_DEBUG_LL
        {
@@ -204,12 +199,13 @@ static struct notifier_block axxia_amba_nb = {
 void __init axxia_dt_init(void)
 {
        base = ioremap(0x2010000000, 0x40000);
-#ifdef CONFIG_KEXEC
        if (!of_find_compatible_node(NULL, NULL, "lsi,axm5500-sim")) {
                dickens = ioremap(0x2000000000, SZ_4M);
+#ifdef CONFIG_KEXEC
                kexec_reinit = flush_l3;
-       }
 #endif
+               flush_l3();
+       }
 
        bus_register_notifier(&platform_bus_type, &axxia_platform_nb);
        bus_register_notifier(&amba_bustype, &axxia_amba_nb);
-- 
1.7.9.5

-- 
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to