ARM: ux500: move l2x0 init to .init_irq
authorArnd Bergmann <arnd@arndb.de>
Mon, 20 Jun 2016 20:27:23 +0000 (22:27 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 12 Jul 2016 09:24:06 +0000 (11:24 +0200)
The generic IRQ init function also enables the l2 cache
implicitly when the machine descriptor sets an .l2c_aux_mask.

Let's use that on ux500 and remove the ux500_l2x0_init()
along with the cpu_is_u8500_family checks.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/mach-ux500/cache-l2x0.c
arch/arm/mach-ux500/cpu-db8500.c
arch/arm/mach-ux500/cpu.c
arch/arm/mach-ux500/setup.h

index 780bd13cd7e3d936834c10a04ef5a44ff4a0e5bb..d7abc11877697ac351f5726d6e78a0869db32596 100644 (file)
@@ -51,17 +51,11 @@ static void ux500_l2c310_write_sec(unsigned long val, unsigned reg)
         */
 }
 
-static int __init ux500_l2x0_init(void)
+void __init ux500_l2x0_init(void)
 {
-       /* Multiplatform guard */
-       if (!((cpu_is_u8500_family() || cpu_is_ux540_family())))
-               return -ENODEV;
-
        /* Unlock before init */
        ux500_l2x0_unlock();
        outer_cache.write_sec = ux500_l2c310_write_sec;
-       l2x0_of_init(0, ~0);
 
        return 0;
 }
-early_initcall(ux500_l2x0_init);
index bbd1b4b8d4412298860e810698d24f1fb54ebae8..3874e9c236e95536e073468646e3a794aa08ac34 100644 (file)
@@ -141,10 +141,11 @@ static const char * stericsson_dt_platform_compat[] = {
 };
 
 DT_MACHINE_START(U8500_DT, "ST-Ericsson Ux5x0 platform (Device Tree Support)")
+       .l2c_aux_val    = 0,
+       .l2c_aux_mask   = ~0,
        .map_io         = u8500_map_io,
        .init_irq       = ux500_init_irq,
        .init_machine   = u8500_init_machine,
-       .init_late      = NULL,
        .dt_compat      = stericsson_dt_platform_compat,
        .restart        = ux500_restart,
 MACHINE_END
index 82156cbc22cec46499d187bc45517b60d62fb01e..f8c2d6f2fb7eb69638642134559e2029fd9d227e 100644 (file)
@@ -65,6 +65,7 @@ void __init ux500_init_irq(void)
        }
        prcmu_early_init(r.start, r.end-r.start);
        ux500_pm_init(r.start, r.end-r.start);
+       ux500_l2x0_init();
 
        /*
         * Init clocks here so that they are available for system timer
index e606847c8b584ea3dfdfd4925ac09402cdc96a7a..8b44b646b1911a58b98c38447214493c9a8a9e9c 100644 (file)
@@ -14,6 +14,9 @@
 #include <asm/mach/arch.h>
 #include <linux/init.h>
 
+
+void ux500_l2x0_init(void);
+
 void ux500_restart(enum reboot_mode mode, const char *cmd);
 
 void __init ux500_setup_id(void);