diff options
author | Magnus Damm <damm@opensource.se> | 2013-02-12 10:45:34 -0500 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-03-12 13:13:18 -0400 |
commit | 2f747dbab424396b797d8abfb5d54c5e19003885 (patch) | |
tree | 451b8c49bc24030f0334028253330c54edb932dc /arch/arm/mach-shmobile | |
parent | 0ae56a951de0efbf36a51de5b2e91db10425c771 (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')
-rw-r--r-- | arch/arm/mach-shmobile/smp-emev2.c | 21 |
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 | ||
53 | static 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 | |||
65 | static void __cpuinit emev2_secondary_init(unsigned int cpu) | 53 | static 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 | ||
94 | static void __init emev2_smp_init_cpus(void) | 82 | static 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 | } |