Commit 0da60225dee270a4a4b86c08509e772e78961b82
Committed by
Simon Horman
1 parent
0ca2894b5a
ARM: shmobile: Use shared SCU SMP boot code on emev2
Use shared SCU code on emev2 for SMP boot. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Showing 2 changed files with 11 additions and 10 deletions Side-by-side Diff
arch/arm/mach-shmobile/Makefile
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | smp-y := platsmp.o headsmp.o |
20 | 20 | smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o headsmp-scu.o platsmp-scu.o |
21 | 21 | smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o headsmp-scu.o platsmp-scu.o |
22 | -smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o | |
22 | +smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o | |
23 | 23 | |
24 | 24 | # IRQ objects |
25 | 25 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o |
arch/arm/mach-shmobile/smp-emev2.c
... | ... | @@ -34,6 +34,12 @@ |
34 | 34 | |
35 | 35 | static int __cpuinit 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 | 43 | arch_send_wakeup_ipi_mask(cpumask_of(cpu_logical_map(cpu))); |
38 | 44 | return 0; |
39 | 45 | } |
40 | 46 | |
41 | 47 | |
... | ... | @@ -42,21 +48,16 @@ |
42 | 48 | { |
43 | 49 | void __iomem *smu; |
44 | 50 | |
45 | - /* setup EMEV2 specific SCU base, enable */ | |
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) */ | |
51 | + /* Tell ROM loader about our vector (in headsmp.S) */ | |
50 | 52 | smu = ioremap(EMEV2_SMU_BASE, PAGE_SIZE); |
51 | 53 | if (smu) { |
52 | 54 | iowrite32(__pa(shmobile_boot_vector), smu + SMU_GENERAL_REG0); |
53 | 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 */ | |
59 | - scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL); | |
58 | + /* setup EMEV2 specific SCU bits */ | |
59 | + shmobile_scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); | |
60 | + shmobile_smp_scu_prepare_cpus(max_cpus); | |
60 | 61 | } |
61 | 62 | |
62 | 63 | struct smp_operations emev2_smp_ops __initdata = { |