diff options
author | Tony Lindgren <tony@atomide.com> | 2013-03-28 17:45:31 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-03-28 17:45:31 -0400 |
commit | c309f7f46167e85d1aae2fd31f23e7d2b5cdfbe0 (patch) | |
tree | 130ae74f0178a73302ea47dfb29403c68875f403 /arch/arm/mach-omap2/omap-smp.c | |
parent | cdcbdfb290b7b15315bf92fb5c339d0a8b32debf (diff) | |
parent | fd1c07861491abf5e0e9ca06799bb5c48f99b64d (diff) |
Merge branch 'for_3.10/omap_generic_cleanup_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux into omap-for-v3.10/cleanup-v2
Diffstat (limited to 'arch/arm/mach-omap2/omap-smp.c')
-rw-r--r-- | arch/arm/mach-omap2/omap-smp.c | 57 |
1 files changed, 20 insertions, 37 deletions
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c index d9727218dd0a..0cbb677c4df4 100644 --- a/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/irqchip/arm-gic.h> | 22 | #include <linux/irqchip/arm-gic.h> |
23 | 23 | ||
24 | #include <asm/cacheflush.h> | ||
25 | #include <asm/smp_scu.h> | 24 | #include <asm/smp_scu.h> |
26 | 25 | ||
27 | #include "omap-secure.h" | 26 | #include "omap-secure.h" |
@@ -103,9 +102,6 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct * | |||
103 | else | 102 | else |
104 | __raw_writel(0x20, base + OMAP_AUX_CORE_BOOT_0); | 103 | __raw_writel(0x20, base + OMAP_AUX_CORE_BOOT_0); |
105 | 104 | ||
106 | flush_cache_all(); | ||
107 | smp_wmb(); | ||
108 | |||
109 | if (!cpu1_clkdm) | 105 | if (!cpu1_clkdm) |
110 | cpu1_clkdm = clkdm_lookup("mpu1_clkdm"); | 106 | cpu1_clkdm = clkdm_lookup("mpu1_clkdm"); |
111 | 107 | ||
@@ -168,38 +164,6 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct * | |||
168 | return 0; | 164 | return 0; |
169 | } | 165 | } |
170 | 166 | ||
171 | static void __init wakeup_secondary(void) | ||
172 | { | ||
173 | void *startup_addr = omap_secondary_startup; | ||
174 | void __iomem *base = omap_get_wakeupgen_base(); | ||
175 | |||
176 | if (cpu_is_omap446x()) { | ||
177 | startup_addr = omap_secondary_startup_4460; | ||
178 | pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD; | ||
179 | } | ||
180 | |||
181 | /* | ||
182 | * Write the address of secondary startup routine into the | ||
183 | * AuxCoreBoot1 where ROM code will jump and start executing | ||
184 | * on secondary core once out of WFE | ||
185 | * A barrier is added to ensure that write buffer is drained | ||
186 | */ | ||
187 | if (omap_secure_apis_support()) | ||
188 | omap_auxcoreboot_addr(virt_to_phys(startup_addr)); | ||
189 | else | ||
190 | __raw_writel(virt_to_phys(omap5_secondary_startup), | ||
191 | base + OMAP_AUX_CORE_BOOT_1); | ||
192 | |||
193 | smp_wmb(); | ||
194 | |||
195 | /* | ||
196 | * Send a 'sev' to wake the secondary core from WFE. | ||
197 | * Drain the outstanding writes to memory | ||
198 | */ | ||
199 | dsb_sev(); | ||
200 | mb(); | ||
201 | } | ||
202 | |||
203 | /* | 167 | /* |
204 | * Initialise the CPU possible map early - this describes the CPUs | 168 | * Initialise the CPU possible map early - this describes the CPUs |
205 | * which may be present or become present in the system. | 169 | * which may be present or become present in the system. |
@@ -235,6 +199,8 @@ static void __init omap4_smp_init_cpus(void) | |||
235 | 199 | ||
236 | static void __init omap4_smp_prepare_cpus(unsigned int max_cpus) | 200 | static void __init omap4_smp_prepare_cpus(unsigned int max_cpus) |
237 | { | 201 | { |
202 | void *startup_addr = omap_secondary_startup; | ||
203 | void __iomem *base = omap_get_wakeupgen_base(); | ||
238 | 204 | ||
239 | /* | 205 | /* |
240 | * Initialise the SCU and wake up the secondary core using | 206 | * Initialise the SCU and wake up the secondary core using |
@@ -242,7 +208,24 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus) | |||
242 | */ | 208 | */ |
243 | if (scu_base) | 209 | if (scu_base) |
244 | scu_enable(scu_base); | 210 | scu_enable(scu_base); |
245 | wakeup_secondary(); | 211 | |
212 | if (cpu_is_omap446x()) { | ||
213 | startup_addr = omap_secondary_startup_4460; | ||
214 | pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD; | ||
215 | } | ||
216 | |||
217 | /* | ||
218 | * Write the address of secondary startup routine into the | ||
219 | * AuxCoreBoot1 where ROM code will jump and start executing | ||
220 | * on secondary core once out of WFE | ||
221 | * A barrier is added to ensure that write buffer is drained | ||
222 | */ | ||
223 | if (omap_secure_apis_support()) | ||
224 | omap_auxcoreboot_addr(virt_to_phys(startup_addr)); | ||
225 | else | ||
226 | __raw_writel(virt_to_phys(omap5_secondary_startup), | ||
227 | base + OMAP_AUX_CORE_BOOT_1); | ||
228 | |||
246 | } | 229 | } |
247 | 230 | ||
248 | struct smp_operations omap4_smp_ops __initdata = { | 231 | struct smp_operations omap4_smp_ops __initdata = { |