diff options
Diffstat (limited to 'arch/arm/mach-msm')
-rw-r--r-- | arch/arm/mach-msm/board-dt-8660.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-dt-8960.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-msm/core.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-msm/hotplug.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-msm/platsmp.c | 24 |
5 files changed, 23 insertions, 25 deletions
diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c index f77f57f3910..e5643f629dc 100644 --- a/arch/arm/mach-msm/board-dt-8660.c +++ b/arch/arm/mach-msm/board-dt-8660.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <mach/board.h> | 21 | #include <mach/board.h> |
22 | #include "common.h" | 22 | #include "common.h" |
23 | #include "core.h" | ||
23 | 24 | ||
24 | static const struct of_device_id msm_dt_gic_match[] __initconst = { | 25 | static const struct of_device_id msm_dt_gic_match[] __initconst = { |
25 | { .compatible = "qcom,msm-8660-qgic", .data = gic_of_init }, | 26 | { .compatible = "qcom,msm-8660-qgic", .data = gic_of_init }, |
@@ -53,6 +54,7 @@ static const char *msm8x60_fluid_match[] __initdata = { | |||
53 | }; | 54 | }; |
54 | 55 | ||
55 | DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)") | 56 | DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)") |
57 | .smp = smp_ops(msm_smp_ops), | ||
56 | .map_io = msm_map_msm8x60_io, | 58 | .map_io = msm_map_msm8x60_io, |
57 | .init_irq = msm8x60_init_irq, | 59 | .init_irq = msm8x60_init_irq, |
58 | .handle_irq = gic_handle_irq, | 60 | .handle_irq = gic_handle_irq, |
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt-8960.c index 8df99b8f3c9..139d61bbc8e 100644 --- a/arch/arm/mach-msm/board-dt-8960.c +++ b/arch/arm/mach-msm/board-dt-8960.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
19 | 19 | ||
20 | #include "common.h" | 20 | #include "common.h" |
21 | #include "core.h" | ||
21 | 22 | ||
22 | static const struct of_device_id msm_dt_gic_match[] __initconst = { | 23 | static const struct of_device_id msm_dt_gic_match[] __initconst = { |
23 | { .compatible = "qcom,msm-qgic2", .data = gic_of_init }, | 24 | { .compatible = "qcom,msm-qgic2", .data = gic_of_init }, |
@@ -40,6 +41,7 @@ static const char * const msm8960_dt_match[] __initconst = { | |||
40 | }; | 41 | }; |
41 | 42 | ||
42 | DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)") | 43 | DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)") |
44 | .smp = smp_ops(msm_smp_ops), | ||
43 | .map_io = msm_map_msm8960_io, | 45 | .map_io = msm_map_msm8960_io, |
44 | .init_irq = msm_dt_init_irq, | 46 | .init_irq = msm_dt_init_irq, |
45 | .timer = &msm_dt_timer, | 47 | .timer = &msm_dt_timer, |
diff --git a/arch/arm/mach-msm/core.h b/arch/arm/mach-msm/core.h new file mode 100644 index 00000000000..a9bab53dddf --- /dev/null +++ b/arch/arm/mach-msm/core.h | |||
@@ -0,0 +1,2 @@ | |||
1 | extern struct smp_operations msm_smp_ops; | ||
2 | extern void msm_cpu_die(unsigned int cpu); | ||
diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c index a446fc14221..002ac1e4723 100644 --- a/arch/arm/mach-msm/hotplug.c +++ b/arch/arm/mach-msm/hotplug.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <asm/cacheflush.h> | 13 | #include <asm/cacheflush.h> |
14 | #include <asm/smp_plat.h> | 14 | #include <asm/smp_plat.h> |
15 | 15 | ||
16 | extern volatile int pen_release; | 16 | #include "core.h" |
17 | 17 | ||
18 | static inline void cpu_enter_lowpower(void) | 18 | static inline void cpu_enter_lowpower(void) |
19 | { | 19 | { |
@@ -57,17 +57,12 @@ static inline void platform_do_lowpower(unsigned int cpu) | |||
57 | } | 57 | } |
58 | } | 58 | } |
59 | 59 | ||
60 | int platform_cpu_kill(unsigned int cpu) | ||
61 | { | ||
62 | return 1; | ||
63 | } | ||
64 | |||
65 | /* | 60 | /* |
66 | * platform-specific code to shutdown a CPU | 61 | * platform-specific code to shutdown a CPU |
67 | * | 62 | * |
68 | * Called with IRQs disabled | 63 | * Called with IRQs disabled |
69 | */ | 64 | */ |
70 | void platform_cpu_die(unsigned int cpu) | 65 | void __ref msm_cpu_die(unsigned int cpu) |
71 | { | 66 | { |
72 | /* | 67 | /* |
73 | * we're ready for shutdown now, so do it | 68 | * we're ready for shutdown now, so do it |
@@ -81,12 +76,3 @@ void platform_cpu_die(unsigned int cpu) | |||
81 | */ | 76 | */ |
82 | cpu_leave_lowpower(); | 77 | cpu_leave_lowpower(); |
83 | } | 78 | } |
84 | |||
85 | int platform_cpu_disable(unsigned int cpu) | ||
86 | { | ||
87 | /* | ||
88 | * we don't allow CPU 0 to be shutdown (it is still too special | ||
89 | * e.g. clock tick interrupts) | ||
90 | */ | ||
91 | return cpu == 0 ? -EPERM : 0; | ||
92 | } | ||
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c index 2d791e6b4ad..637021c0d8a 100644 --- a/arch/arm/mach-msm/platsmp.c +++ b/arch/arm/mach-msm/platsmp.c | |||
@@ -23,17 +23,13 @@ | |||
23 | #include <asm/smp_plat.h> | 23 | #include <asm/smp_plat.h> |
24 | 24 | ||
25 | #include "scm-boot.h" | 25 | #include "scm-boot.h" |
26 | #include "core.h" | ||
26 | 27 | ||
27 | #define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x15A0 | 28 | #define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x15A0 |
28 | #define SCSS_CPU1CORE_RESET 0xD80 | 29 | #define SCSS_CPU1CORE_RESET 0xD80 |
29 | #define SCSS_DBG_STATUS_CORE_PWRDUP 0xE64 | 30 | #define SCSS_DBG_STATUS_CORE_PWRDUP 0xE64 |
30 | 31 | ||
31 | extern void msm_secondary_startup(void); | 32 | extern void msm_secondary_startup(void); |
32 | /* | ||
33 | * control for which core is the next to come out of the secondary | ||
34 | * boot "holding pen". | ||
35 | */ | ||
36 | volatile int pen_release = -1; | ||
37 | 33 | ||
38 | static DEFINE_SPINLOCK(boot_lock); | 34 | static DEFINE_SPINLOCK(boot_lock); |
39 | 35 | ||
@@ -43,7 +39,7 @@ static inline int get_core_count(void) | |||
43 | return ((read_cpuid_id() >> 4) & 3) + 1; | 39 | return ((read_cpuid_id() >> 4) & 3) + 1; |
44 | } | 40 | } |
45 | 41 | ||
46 | void __cpuinit platform_secondary_init(unsigned int cpu) | 42 | static void __cpuinit msm_secondary_init(unsigned int cpu) |
47 | { | 43 | { |
48 | /* | 44 | /* |
49 | * if any interrupts are already enabled for the primary | 45 | * if any interrupts are already enabled for the primary |
@@ -85,7 +81,7 @@ static __cpuinit void prepare_cold_cpu(unsigned int cpu) | |||
85 | "address\n"); | 81 | "address\n"); |
86 | } | 82 | } |
87 | 83 | ||
88 | int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | 84 | static int __cpuinit msm_boot_secondary(unsigned int cpu, struct task_struct *idle) |
89 | { | 85 | { |
90 | unsigned long timeout; | 86 | unsigned long timeout; |
91 | static int cold_boot_done; | 87 | static int cold_boot_done; |
@@ -145,7 +141,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
145 | * does not support the ARM SCU, so just set the possible cpu mask to | 141 | * does not support the ARM SCU, so just set the possible cpu mask to |
146 | * NR_CPUS. | 142 | * NR_CPUS. |
147 | */ | 143 | */ |
148 | void __init smp_init_cpus(void) | 144 | static void __init msm_smp_init_cpus(void) |
149 | { | 145 | { |
150 | unsigned int i, ncores = get_core_count(); | 146 | unsigned int i, ncores = get_core_count(); |
151 | 147 | ||
@@ -161,6 +157,16 @@ void __init smp_init_cpus(void) | |||
161 | set_smp_cross_call(gic_raise_softirq); | 157 | set_smp_cross_call(gic_raise_softirq); |
162 | } | 158 | } |
163 | 159 | ||
164 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) | 160 | static void __init msm_smp_prepare_cpus(unsigned int max_cpus) |
165 | { | 161 | { |
166 | } | 162 | } |
163 | |||
164 | struct smp_operations msm_smp_ops __initdata = { | ||
165 | .smp_init_cpus = msm_smp_init_cpus, | ||
166 | .smp_prepare_cpus = msm_smp_prepare_cpus, | ||
167 | .smp_secondary_init = msm_secondary_init, | ||
168 | .smp_boot_secondary = msm_boot_secondary, | ||
169 | #ifdef CONFIG_HOTPLUG_CPU | ||
170 | .cpu_die = msm_cpu_die, | ||
171 | #endif | ||
172 | }; | ||