diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-04 18:29:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-04 18:29:53 -0500 |
commit | 9ef9dc69d4167276c04590d67ee55de8380bc1ad (patch) | |
tree | f0afd03cd9184eda2fe14c41f09daec79a62682e /arch/arm/mach-realview/platsmp.c | |
parent | 2c8296f8cf0ec40867965dddef3dfe92f73b38f4 (diff) | |
parent | 0d899e1b0000ddf78a75d7dcf9a9029d6f7f8091 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (44 commits)
[ARM] 4822/1: RealView: Change the REALVIEW_MPCORE configuration option
[ARM] 4821/1: RealView: Remove the platform dependencies from localtimer.c
[ARM] 4820/1: RealView: Select the timer IRQ at run-time
[ARM] 4819/1: RealView: Fix entry-macro.S to work with multiple platforms
[ARM] 4818/1: RealView: Add core-tile detection
[ARM] 4817/1: RealView: Move the AMBA resource definitions to realview_eb.c
[ARM] 4816/1: RealView: Move the platform-specific definitions into board-eb.h
[ARM] 4815/1: RealView: Add clockevents suport for the local timers
[ARM] 4814/1: RealView: Add broadcasting clockevents support for ARM11MPCore
[ARM] 4813/1: Add SMP helper functions for clockevents support
[ARM] 4812/1: RealView: clockevents support for the RealView platforms
[ARM] 4811/1: RealView: clocksource support for the RealView platforms
[ARM] 4736/1: Export atags to userspace and allow kexec to use customised atags
[ARM] 4798/1: pcm027: fix missing header file
[ARM] 4803/1: pxa: fix building issue of poodle.c caused by patch 4737/1
[ARM] 4801/1: pxa: fix building issues of missing pxa2xx-regs.h
[ARM] pxa: introduce sysdev for pxa3xx static memory controller
[ARM] pxa: add preliminary suspend/resume code for pxa3xx
[ARM] pxa: introduce sysdev for GPIO register saving/restoring
[ARM] pxa: introduce sysdev for IRQ register saving/restoring
...
Diffstat (limited to 'arch/arm/mach-realview/platsmp.c')
-rw-r--r-- | arch/arm/mach-realview/platsmp.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index fce3596f9950..de2b7159557d 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/hardware/arm_scu.h> | 18 | #include <asm/hardware/arm_scu.h> |
19 | #include <asm/hardware.h> | 19 | #include <asm/hardware.h> |
20 | #include <asm/io.h> | 20 | #include <asm/io.h> |
21 | #include <asm/mach-types.h> | ||
21 | 22 | ||
22 | extern void realview_secondary_startup(void); | 23 | extern void realview_secondary_startup(void); |
23 | 24 | ||
@@ -31,9 +32,13 @@ static unsigned int __init get_core_count(void) | |||
31 | { | 32 | { |
32 | unsigned int ncores; | 33 | unsigned int ncores; |
33 | 34 | ||
34 | ncores = __raw_readl(__io_address(REALVIEW_MPCORE_SCU_BASE) + SCU_CONFIG); | 35 | if (machine_is_realview_eb() && core_tile_eb11mp()) { |
36 | ncores = __raw_readl(__io_address(REALVIEW_EB11MP_SCU_BASE) + SCU_CONFIG); | ||
37 | ncores = (ncores & 0x03) + 1; | ||
38 | } else | ||
39 | ncores = 1; | ||
35 | 40 | ||
36 | return (ncores & 0x03) + 1; | 41 | return ncores; |
37 | } | 42 | } |
38 | 43 | ||
39 | static DEFINE_SPINLOCK(boot_lock); | 44 | static DEFINE_SPINLOCK(boot_lock); |
@@ -52,7 +57,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
52 | * core (e.g. timer irq), then they will not have been enabled | 57 | * core (e.g. timer irq), then they will not have been enabled |
53 | * for us: do so | 58 | * for us: do so |
54 | */ | 59 | */ |
55 | gic_cpu_init(0, __io_address(REALVIEW_GIC_CPU_BASE)); | 60 | gic_cpu_init(0, __io_address(REALVIEW_EB11MP_GIC_CPU_BASE)); |
56 | 61 | ||
57 | /* | 62 | /* |
58 | * let the primary processor know we're out of the | 63 | * let the primary processor know we're out of the |
@@ -187,10 +192,15 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
187 | if (max_cpus > ncores) | 192 | if (max_cpus > ncores) |
188 | max_cpus = ncores; | 193 | max_cpus = ncores; |
189 | 194 | ||
195 | #ifdef CONFIG_LOCAL_TIMERS | ||
190 | /* | 196 | /* |
191 | * Enable the local timer for primary CPU | 197 | * Enable the local timer for primary CPU. If the device is |
198 | * dummy (!CONFIG_LOCAL_TIMERS), it was already registers in | ||
199 | * realview_timer_init | ||
192 | */ | 200 | */ |
193 | local_timer_setup(cpu); | 201 | if (machine_is_realview_eb() && core_tile_eb11mp()) |
202 | local_timer_setup(cpu); | ||
203 | #endif | ||
194 | 204 | ||
195 | /* | 205 | /* |
196 | * Initialise the present map, which describes the set of CPUs | 206 | * Initialise the present map, which describes the set of CPUs |