summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-realview
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-05-16 11:51:14 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-05-17 19:00:37 +0100
commita8cbcd92bd4bf893085eddf7f58e63ea98503d94 (patch)
tree7798cd1487362208793632f4ff0b4a6f579eb0ec /arch/arm/mach-realview
parent49613d4d9ae759193915823e67de546fca58c951 (diff)
downloadblackbird-op-linux-a8cbcd92bd4bf893085eddf7f58e63ea98503d94.tar.gz
blackbird-op-linux-a8cbcd92bd4bf893085eddf7f58e63ea98503d94.zip
[ARM] smp: separate SCU support code from realview
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-realview')
-rw-r--r--arch/arm/mach-realview/platsmp.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
index c567d3e24447..c862ce19587e 100644
--- a/arch/arm/mach-realview/platsmp.c
+++ b/arch/arm/mach-realview/platsmp.c
@@ -45,31 +45,12 @@ static void __iomem *scu_base_addr(void)
return (void __iomem *)0;
}
-static unsigned int __init get_core_count(void)
+static inline unsigned int get_core_count(void)
{
- unsigned int ncores;
void __iomem *scu_base = scu_base_addr();
-
- if (scu_base) {
- ncores = __raw_readl(scu_base + SCU_CONFIG);
- ncores = (ncores & 0x03) + 1;
- } else
- ncores = 1;
-
- return ncores;
-}
-
-/*
- * Setup the SCU
- */
-static void scu_enable(void)
-{
- u32 scu_ctrl;
- void __iomem *scu_base = scu_base_addr();
-
- scu_ctrl = __raw_readl(scu_base + SCU_CTRL);
- scu_ctrl |= 1;
- __raw_writel(scu_ctrl, scu_base + SCU_CTRL);
+ if (scu_base)
+ return scu_get_core_count(scu_base);
+ return 1;
}
static DEFINE_SPINLOCK(boot_lock);
@@ -239,7 +220,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
*/
percpu_timer_setup();
- scu_enable();
+ scu_enable(scu_base_addr());
poke_milo();
}
}
OpenPOWER on IntegriCloud