aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-realview/platsmp.c
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2008-02-04 11:39:00 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-02-04 12:52:24 -0500
commit7dd19e755dbe481ae42590dbd921dfd47e94779c (patch)
tree66056a17aa12457f8b5f91995fe774958a1d3534 /arch/arm/mach-realview/platsmp.c
parent0fc2a1616f37175ff0cf54b99e9b76f7717a3f10 (diff)
[ARM] 4818/1: RealView: Add core-tile detection
This patch adds the core-tile detection and only enables devices if the corresponding tile is present. It currently detects the ARM11MPCore via the core_tile_eb11mp() macro. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-realview/platsmp.c')
-rw-r--r--arch/arm/mach-realview/platsmp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
index 0186c80c9040..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
22extern void realview_secondary_startup(void); 23extern 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_EB11MP_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
39static DEFINE_SPINLOCK(boot_lock); 44static DEFINE_SPINLOCK(boot_lock);
@@ -193,7 +198,8 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
193 * dummy (!CONFIG_LOCAL_TIMERS), it was already registers in 198 * dummy (!CONFIG_LOCAL_TIMERS), it was already registers in
194 * realview_timer_init 199 * realview_timer_init
195 */ 200 */
196 local_timer_setup(cpu); 201 if (machine_is_realview_eb() && core_tile_eb11mp())
202 local_timer_setup(cpu);
197#endif 203#endif
198 204
199 /* 205 /*