Bladeren bron

ARM: ux500: move l2x0 init to .init_irq

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>
Arnd Bergmann 9 jaren geleden
bovenliggende
commit
1e6cbc0691
4 gewijzigde bestanden met toevoegingen van 7 en 8 verwijderingen
  1. 1 7
      arch/arm/mach-ux500/cache-l2x0.c
  2. 2 1
      arch/arm/mach-ux500/cpu-db8500.c
  3. 1 0
      arch/arm/mach-ux500/cpu.c
  4. 3 0
      arch/arm/mach-ux500/setup.h

+ 1 - 7
arch/arm/mach-ux500/cache-l2x0.c

@@ -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);

+ 2 - 1
arch/arm/mach-ux500/cpu-db8500.c

@@ -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

+ 1 - 0
arch/arm/mach-ux500/cpu.c

@@ -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

+ 3 - 0
arch/arm/mach-ux500/setup.h

@@ -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);