aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/smp-emev2.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2013-02-12 10:45:34 -0500
committerSimon Horman <horms+renesas@verge.net.au>2013-03-12 13:13:18 -0400
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 64278215adaa..4ede41339a70 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)
50 50
51} 51}
52 52
53static unsigned int __init emev2_get_core_count(void)
54{
55 if (!scu_base) {
56 scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE);
57 emev2_clock_init(); /* need ioremapped SMU */
58 }
59
60 WARN_ON_ONCE(!scu_base);
61
62 return scu_base ? scu_get_core_count(scu_base) : 1;
63}
64
65static void __cpuinit emev2_secondary_init(unsigned int cpu) 53static void __cpuinit emev2_secondary_init(unsigned int cpu)
66{ 54{
67 gic_secondary_init(0); 55 gic_secondary_init(0);
@@ -93,7 +81,14 @@ static void __init emev2_smp_prepare_cpus(unsigned int max_cpus)
93 81
94static void __init emev2_smp_init_cpus(void) 82static void __init emev2_smp_init_cpus(void)
95{ 83{
96 unsigned int ncores = emev2_get_core_count(); 84 unsigned int ncores;
85
86 if (!scu_base) {
87 scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE);
88 emev2_clock_init(); /* need ioremapped SMU */
89 }
90
91 ncores = scu_base ? scu_get_core_count(scu_base) : 1;
97 92
98 shmobile_smp_init_cpus(ncores); 93 shmobile_smp_init_cpus(ncores);
99} 94}