aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/smp-emev2.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-08-28 13:04:38 -0400
committerOlof Johansson <olof@lixom.net>2013-08-28 13:04:38 -0400
commit25475030ec0e2c4c05f3ecb2c068f6e42944fd04 (patch)
treefcf9a7963331132780da40e1686dfd13603fe592 /arch/arm/mach-shmobile/smp-emev2.c
parente707bb338b5c6f5859578ae6eb426a21b78b0f42 (diff)
parent1d33a354bbb618ba578bb372ebc18fe58457f6f3 (diff)
Merge tag 'renesas-smp-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/renesas
From Simon Horman: Renesas ARM based SoC SMP updates for v3.12 * Per-CPU SMP boot and sleep code on SoCs that use SCU * Shared SCU CPU Hotplug code on r8a7779 and sh73a0 SoCs * Shared SCU CPU boot code on emev2, r8a7779 and sh73a0 SoCs * tag 'renesas-smp-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: Per-CPU SMP boot / sleep code for SCU SoCs ARM: shmobile: Introduce per-CPU SMP boot / sleep code ARM: shmobile: Use shared SCU CPU Hotplug code on r8a7779 ARM: shmobile: Use shared SCU CPU Hotplug code on sh73a0 ARM: shmobile: Add shared SCU CPU Hotplug code ARM: shmobile: Use shared SCU SMP boot code on emev2 ARM: shmobile: Use shared SCU SMP boot code on r8a7779 ARM: shmobile: Use shared SCU SMP boot code on sh73a0 ARM: shmobile: Introduce shared SCU SMP boot code Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-shmobile/smp-emev2.c')
-rw-r--r--arch/arm/mach-shmobile/smp-emev2.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
index 78e84c582453..522de5ebb55f 100644
--- a/arch/arm/mach-shmobile/smp-emev2.c
+++ b/arch/arm/mach-shmobile/smp-emev2.c
@@ -34,6 +34,12 @@
34 34
35static int emev2_boot_secondary(unsigned int cpu, struct task_struct *idle) 35static int emev2_boot_secondary(unsigned int cpu, struct task_struct *idle)
36{ 36{
37 int ret;
38
39 ret = shmobile_smp_scu_boot_secondary(cpu, idle);
40 if (ret)
41 return ret;
42
37 arch_send_wakeup_ipi_mask(cpumask_of(cpu_logical_map(cpu))); 43 arch_send_wakeup_ipi_mask(cpumask_of(cpu_logical_map(cpu)));
38 return 0; 44 return 0;
39} 45}
@@ -42,21 +48,16 @@ static void __init emev2_smp_prepare_cpus(unsigned int max_cpus)
42{ 48{
43 void __iomem *smu; 49 void __iomem *smu;
44 50
45 /* setup EMEV2 specific SCU base, enable */ 51 /* Tell ROM loader about our vector (in headsmp.S) */
46 shmobile_scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE);
47 scu_enable(shmobile_scu_base);
48
49 /* Tell ROM loader about our vector (in headsmp-scu.S, headsmp.S) */
50 smu = ioremap(EMEV2_SMU_BASE, PAGE_SIZE); 52 smu = ioremap(EMEV2_SMU_BASE, PAGE_SIZE);
51 if (smu) { 53 if (smu) {
52 iowrite32(__pa(shmobile_boot_vector), smu + SMU_GENERAL_REG0); 54 iowrite32(__pa(shmobile_boot_vector), smu + SMU_GENERAL_REG0);
53 iounmap(smu); 55 iounmap(smu);
54 } 56 }
55 shmobile_boot_fn = virt_to_phys(shmobile_boot_scu);
56 shmobile_boot_arg = (unsigned long)shmobile_scu_base;
57 57
58 /* enable cache coherency on booting CPU */ 58 /* setup EMEV2 specific SCU bits */
59 scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL); 59 shmobile_scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE);
60 shmobile_smp_scu_prepare_cpus(max_cpus);
60} 61}
61 62
62struct smp_operations emev2_smp_ops __initdata = { 63struct smp_operations emev2_smp_ops __initdata = {