summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/smp-emev2.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2013-02-13 00:45:34 +0900
committerSimon Horman <horms+renesas@verge.net.au>2013-03-13 02:13:18 +0900
commit2f747dbab424396b797d8abfb5d54c5e19003885 (patch)
tree451b8c49bc24030f0334028253330c54edb932dc /arch/arm/mach-shmobile/smp-emev2.c
parent0ae56a951de0efbf36a51de5b2e91db10425c771 (diff)
ARM: shmobile: Remove emev2_get_core_count()
Reduce the number of lines of code in smp-emev2.c by getting rid of the emev2_get_core_count() function. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/smp-emev2.c')
-rw-r--r--arch/arm/mach-shmobile/smp-emev2.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
index 64278215ada..4ede41339a7 100644
--- a/arch/arm/mach-shmobile/smp-emev2.c
+++ b/arch/arm/mach-shmobile/smp-emev2.c
@@ -50,18 +50,6 @@ static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)
}
-static unsigned int __init emev2_get_core_count(void)
-{
- if (!scu_base) {
- scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE);
- emev2_clock_init(); /* need ioremapped SMU */
- }
-
- WARN_ON_ONCE(!scu_base);
-
- return scu_base ? scu_get_core_count(scu_base) : 1;
-}
-
static void __cpuinit emev2_secondary_init(unsigned int cpu)
{
gic_secondary_init(0);
@@ -93,7 +81,14 @@ static void __init emev2_smp_prepare_cpus(unsigned int max_cpus)
static void __init emev2_smp_init_cpus(void)
{
- unsigned int ncores = emev2_get_core_count();
+ unsigned int ncores;
+
+ if (!scu_base) {
+ scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE);
+ emev2_clock_init(); /* need ioremapped SMU */
+ }
+
+ ncores = scu_base ? scu_get_core_count(scu_base) : 1;
shmobile_smp_init_cpus(ncores);
}