aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap-smp.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-04-08 12:03:08 -0400
committerArnd Bergmann <arnd@arndb.de>2013-04-08 12:03:08 -0400
commit6fa6183aefcdefe0db26a0ceeaaf11c149acd449 (patch)
treea7c8fc974e8731c4ad60fb28c31734a24093dc92 /arch/arm/mach-omap2/omap-smp.c
parent321ae6fa03688ba901b1e3043961a44ed6333014 (diff)
parentc309f7f46167e85d1aae2fd31f23e7d2b5cdfbe0 (diff)
Merge tag 'omap-for-v3.10/cleanup-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup
From Tony Lindgren <tony@atomide.com>: Clean up related changes for v3.10 merge window. Mostly clock and PM related with removal of now unused DMA channel definitions. The clock change to use SoC specific lists will make it a little bit easier to add support for new SoCs variants without having to patch all over the place. * tag 'omap-for-v3.10/cleanup-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP4: Fix the init code to have OMAP4460 errata available in DT build ARM: OMAP4: PM: Now remove L4 per clockdomain static depedency with MPU ARM: OMAP4: PM: Remove L4 wakeup depedency with MPU since errata fix exist now ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus() ARM: OMAP4+: Remove out of placed smp_wmb() in secondary wakeup code ARM: OMAP4+: Remove un-necessary cacheflush in secondary CPU boot path ARM: OMAP4+: Remove the un-necessary cache flush from hotplug code ARM: OMAP2+: PM: Remove bogus fiq_[enable/disable] tuple ARM: OMAP4+: Use common scratchpad SAR RAM offsets for all architectures ARM: OMAP2+: Remove unused DMA channel definitions ARM: OMAP1: Remove unused DMA channel definitions ARM: OMAP2+: clock data: Remove CK_* flags Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-omap2/omap-smp.c')
-rw-r--r--arch/arm/mach-omap2/omap-smp.c57
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 e7a449758ab5..f76f94fb8473 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"
@@ -96,9 +95,6 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct *
96 else 95 else
97 __raw_writel(0x20, base + OMAP_AUX_CORE_BOOT_0); 96 __raw_writel(0x20, base + OMAP_AUX_CORE_BOOT_0);
98 97
99 flush_cache_all();
100 smp_wmb();
101
102 if (!cpu1_clkdm) 98 if (!cpu1_clkdm)
103 cpu1_clkdm = clkdm_lookup("mpu1_clkdm"); 99 cpu1_clkdm = clkdm_lookup("mpu1_clkdm");
104 100
@@ -161,38 +157,6 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct *
161 return 0; 157 return 0;
162} 158}
163 159
164static void __init wakeup_secondary(void)
165{
166 void *startup_addr = omap_secondary_startup;
167 void __iomem *base = omap_get_wakeupgen_base();
168
169 if (cpu_is_omap446x()) {
170 startup_addr = omap_secondary_startup_4460;
171 pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD;
172 }
173
174 /*
175 * Write the address of secondary startup routine into the
176 * AuxCoreBoot1 where ROM code will jump and start executing
177 * on secondary core once out of WFE
178 * A barrier is added to ensure that write buffer is drained
179 */
180 if (omap_secure_apis_support())
181 omap_auxcoreboot_addr(virt_to_phys(startup_addr));
182 else
183 __raw_writel(virt_to_phys(omap5_secondary_startup),
184 base + OMAP_AUX_CORE_BOOT_1);
185
186 smp_wmb();
187
188 /*
189 * Send a 'sev' to wake the secondary core from WFE.
190 * Drain the outstanding writes to memory
191 */
192 dsb_sev();
193 mb();
194}
195
196/* 160/*
197 * Initialise the CPU possible map early - this describes the CPUs 161 * Initialise the CPU possible map early - this describes the CPUs
198 * which may be present or become present in the system. 162 * which may be present or become present in the system.
@@ -228,6 +192,8 @@ static void __init omap4_smp_init_cpus(void)
228 192
229static void __init omap4_smp_prepare_cpus(unsigned int max_cpus) 193static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
230{ 194{
195 void *startup_addr = omap_secondary_startup;
196 void __iomem *base = omap_get_wakeupgen_base();
231 197
232 /* 198 /*
233 * Initialise the SCU and wake up the secondary core using 199 * Initialise the SCU and wake up the secondary core using
@@ -235,7 +201,24 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
235 */ 201 */
236 if (scu_base) 202 if (scu_base)
237 scu_enable(scu_base); 203 scu_enable(scu_base);
238 wakeup_secondary(); 204
205 if (cpu_is_omap446x()) {
206 startup_addr = omap_secondary_startup_4460;
207 pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD;
208 }
209
210 /*
211 * Write the address of secondary startup routine into the
212 * AuxCoreBoot1 where ROM code will jump and start executing
213 * on secondary core once out of WFE
214 * A barrier is added to ensure that write buffer is drained
215 */
216 if (omap_secure_apis_support())
217 omap_auxcoreboot_addr(virt_to_phys(startup_addr));
218 else
219 __raw_writel(virt_to_phys(omap5_secondary_startup),
220 base + OMAP_AUX_CORE_BOOT_1);
221
239} 222}
240 223
241struct smp_operations omap4_smp_ops __initdata = { 224struct smp_operations omap4_smp_ops __initdata = {