diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2016-06-20 16:27:23 -0400 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2016-07-12 05:24:06 -0400 |
| commit | 1e6cbc0691abc6b1a053f98d8ce1d692c8c71501 (patch) | |
| tree | 30bc2f7055afc27ad0e40fb1ef402dfe53f7c1d2 /arch/arm/mach-ux500 | |
| parent | 4e657946cbf68998b51b331375a1209e90792fe4 (diff) | |
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>
Diffstat (limited to 'arch/arm/mach-ux500')
| -rw-r--r-- | arch/arm/mach-ux500/cache-l2x0.c | 8 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/cpu-db8500.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/cpu.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-ux500/setup.h | 3 |
4 files changed, 7 insertions, 8 deletions
diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c index 780bd13cd7e3..d7abc1187769 100644 --- a/arch/arm/mach-ux500/cache-l2x0.c +++ b/arch/arm/mach-ux500/cache-l2x0.c | |||
| @@ -51,17 +51,11 @@ static void ux500_l2c310_write_sec(unsigned long val, unsigned reg) | |||
| 51 | */ | 51 | */ |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | static int __init ux500_l2x0_init(void) | 54 | void __init ux500_l2x0_init(void) |
| 55 | { | 55 | { |
| 56 | /* Multiplatform guard */ | ||
| 57 | if (!((cpu_is_u8500_family() || cpu_is_ux540_family()))) | ||
| 58 | return -ENODEV; | ||
| 59 | |||
| 60 | /* Unlock before init */ | 56 | /* Unlock before init */ |
| 61 | ux500_l2x0_unlock(); | 57 | ux500_l2x0_unlock(); |
| 62 | outer_cache.write_sec = ux500_l2c310_write_sec; | 58 | outer_cache.write_sec = ux500_l2c310_write_sec; |
| 63 | l2x0_of_init(0, ~0); | ||
| 64 | 59 | ||
| 65 | return 0; | 60 | return 0; |
| 66 | } | 61 | } |
| 67 | early_initcall(ux500_l2x0_init); | ||
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index bbd1b4b8d441..3874e9c236e9 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
| @@ -141,10 +141,11 @@ static const char * stericsson_dt_platform_compat[] = { | |||
| 141 | }; | 141 | }; |
| 142 | 142 | ||
| 143 | DT_MACHINE_START(U8500_DT, "ST-Ericsson Ux5x0 platform (Device Tree Support)") | 143 | DT_MACHINE_START(U8500_DT, "ST-Ericsson Ux5x0 platform (Device Tree Support)") |
| 144 | .l2c_aux_val = 0, | ||
| 145 | .l2c_aux_mask = ~0, | ||
| 144 | .map_io = u8500_map_io, | 146 | .map_io = u8500_map_io, |
| 145 | .init_irq = ux500_init_irq, | 147 | .init_irq = ux500_init_irq, |
| 146 | .init_machine = u8500_init_machine, | 148 | .init_machine = u8500_init_machine, |
| 147 | .init_late = NULL, | ||
| 148 | .dt_compat = stericsson_dt_platform_compat, | 149 | .dt_compat = stericsson_dt_platform_compat, |
| 149 | .restart = ux500_restart, | 150 | .restart = ux500_restart, |
| 150 | MACHINE_END | 151 | MACHINE_END |
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 82156cbc22ce..f8c2d6f2fb7e 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
| @@ -65,6 +65,7 @@ void __init ux500_init_irq(void) | |||
| 65 | } | 65 | } |
| 66 | prcmu_early_init(r.start, r.end-r.start); | 66 | prcmu_early_init(r.start, r.end-r.start); |
| 67 | ux500_pm_init(r.start, r.end-r.start); | 67 | ux500_pm_init(r.start, r.end-r.start); |
| 68 | ux500_l2x0_init(); | ||
| 68 | 69 | ||
| 69 | /* | 70 | /* |
| 70 | * Init clocks here so that they are available for system timer | 71 | * Init clocks here so that they are available for system timer |
diff --git a/arch/arm/mach-ux500/setup.h b/arch/arm/mach-ux500/setup.h index e606847c8b58..8b44b646b191 100644 --- a/arch/arm/mach-ux500/setup.h +++ b/arch/arm/mach-ux500/setup.h | |||
| @@ -14,6 +14,9 @@ | |||
| 14 | #include <asm/mach/arch.h> | 14 | #include <asm/mach/arch.h> |
| 15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
| 16 | 16 | ||
| 17 | |||
| 18 | void ux500_l2x0_init(void); | ||
| 19 | |||
| 17 | void ux500_restart(enum reboot_mode mode, const char *cmd); | 20 | void ux500_restart(enum reboot_mode mode, const char *cmd); |
| 18 | 21 | ||
| 19 | void __init ux500_setup_id(void); | 22 | void __init ux500_setup_id(void); |
