diff options
Diffstat (limited to 'arch/arm/mach-realview/platsmp.c')
-rw-r--r-- | arch/arm/mach-realview/platsmp.c | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index e102aeb0f76e..8fce85f33033 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <mach/board-pb11mp.h> | 23 | #include <mach/board-pb11mp.h> |
24 | #include <mach/scu.h> | 24 | #include <mach/scu.h> |
25 | 25 | ||
26 | #include "core.h" | ||
27 | |||
26 | extern void realview_secondary_startup(void); | 28 | extern void realview_secondary_startup(void); |
27 | 29 | ||
28 | /* | 30 | /* |
@@ -31,15 +33,20 @@ extern void realview_secondary_startup(void); | |||
31 | */ | 33 | */ |
32 | volatile int __cpuinitdata pen_release = -1; | 34 | volatile int __cpuinitdata pen_release = -1; |
33 | 35 | ||
36 | static void __iomem *scu_base_addr(void) | ||
37 | { | ||
38 | if (machine_is_realview_eb_mp()) | ||
39 | return __io_address(REALVIEW_EB11MP_SCU_BASE); | ||
40 | else if (machine_is_realview_pb11mp()) | ||
41 | return __io_address(REALVIEW_TC11MP_SCU_BASE); | ||
42 | else | ||
43 | return (void __iomem *)0; | ||
44 | } | ||
45 | |||
34 | static unsigned int __init get_core_count(void) | 46 | static unsigned int __init get_core_count(void) |
35 | { | 47 | { |
36 | unsigned int ncores; | 48 | unsigned int ncores; |
37 | void __iomem *scu_base = 0; | 49 | void __iomem *scu_base = scu_base_addr(); |
38 | |||
39 | if (machine_is_realview_eb() && core_tile_eb11mp()) | ||
40 | scu_base = __io_address(REALVIEW_EB11MP_SCU_BASE); | ||
41 | else if (machine_is_realview_pb11mp()) | ||
42 | scu_base = __io_address(REALVIEW_TC11MP_SCU_BASE); | ||
43 | 50 | ||
44 | if (scu_base) { | 51 | if (scu_base) { |
45 | ncores = __raw_readl(scu_base + SCU_CONFIG); | 52 | ncores = __raw_readl(scu_base + SCU_CONFIG); |
@@ -56,14 +63,7 @@ static unsigned int __init get_core_count(void) | |||
56 | static void scu_enable(void) | 63 | static void scu_enable(void) |
57 | { | 64 | { |
58 | u32 scu_ctrl; | 65 | u32 scu_ctrl; |
59 | void __iomem *scu_base; | 66 | void __iomem *scu_base = scu_base_addr(); |
60 | |||
61 | if (machine_is_realview_eb() && core_tile_eb11mp()) | ||
62 | scu_base = __io_address(REALVIEW_EB11MP_SCU_BASE); | ||
63 | else if (machine_is_realview_pb11mp()) | ||
64 | scu_base = __io_address(REALVIEW_TC11MP_SCU_BASE); | ||
65 | else | ||
66 | BUG(); | ||
67 | 67 | ||
68 | scu_ctrl = __raw_readl(scu_base + SCU_CTRL); | 68 | scu_ctrl = __raw_readl(scu_base + SCU_CTRL); |
69 | scu_ctrl |= 1; | 69 | scu_ctrl |= 1; |
@@ -88,10 +88,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
88 | * core (e.g. timer irq), then they will not have been enabled | 88 | * core (e.g. timer irq), then they will not have been enabled |
89 | * for us: do so | 89 | * for us: do so |
90 | */ | 90 | */ |
91 | if (machine_is_realview_eb() && core_tile_eb11mp()) | 91 | gic_cpu_init(0, gic_cpu_base_addr); |
92 | gic_cpu_init(0, __io_address(REALVIEW_EB11MP_GIC_CPU_BASE)); | ||
93 | else if (machine_is_realview_pb11mp()) | ||
94 | gic_cpu_init(0, __io_address(REALVIEW_TC11MP_GIC_CPU_BASE)); | ||
95 | 92 | ||
96 | /* | 93 | /* |
97 | * let the primary processor know we're out of the | 94 | * let the primary processor know we're out of the |
@@ -232,9 +229,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
232 | * dummy (!CONFIG_LOCAL_TIMERS), it was already registers in | 229 | * dummy (!CONFIG_LOCAL_TIMERS), it was already registers in |
233 | * realview_timer_init | 230 | * realview_timer_init |
234 | */ | 231 | */ |
235 | if ((machine_is_realview_eb() && core_tile_eb11mp()) || | 232 | local_timer_setup(); |
236 | machine_is_realview_pb11mp()) | ||
237 | local_timer_setup(cpu); | ||
238 | #endif | 233 | #endif |
239 | 234 | ||
240 | /* | 235 | /* |