aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm+renesas@opensource.se>2014-06-06 03:20:10 -0400
committerSimon Horman <horms+renesas@verge.net.au>2014-06-26 02:51:43 -0400
commit8b438bcb9009609a15e5480ab1947acff6fb9005 (patch)
tree007f22f8fd4c319a1dba7145e3c26c8757ebb693
parent5201b5a792e95e3ecebe74cd3553413a67da09db (diff)
ARM: shmobile: Allow use of boot code for non-SMP case
Allow build of platsmp.c and headsmp.S even though SMP is disabled in the kernel configuration. With this in place it is possible to share the reset vector setup code with power management code that needs to be built even though SMP is disabled. Signed-off-by: Magnus Damm <damm+renesas@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r--arch/arm/mach-shmobile/Makefile11
-rw-r--r--arch/arm/mach-shmobile/headsmp.S13
2 files changed, 15 insertions, 9 deletions
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index 9c0ad3e115a6..279d3f3aad4d 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -34,17 +34,17 @@ obj-$(CONFIG_ARCH_R8A7791) += clock-r8a7791.o
34obj-$(CONFIG_ARCH_R7S72100) += clock-r7s72100.o 34obj-$(CONFIG_ARCH_R7S72100) += clock-r7s72100.o
35endif 35endif
36 36
37# CPU reset vector handling objects
38cpu-y := platsmp.o headsmp.o
39
37# SMP objects 40# SMP objects
38smp-y := platsmp.o headsmp.o 41smp-y := $(cpu-y)
39smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o headsmp-scu.o platsmp-scu.o 42smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o headsmp-scu.o platsmp-scu.o
40smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o headsmp-scu.o platsmp-scu.o 43smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o headsmp-scu.o platsmp-scu.o
41smp-$(CONFIG_ARCH_R8A7790) += smp-r8a7790.o platsmp-apmu.o 44smp-$(CONFIG_ARCH_R8A7790) += smp-r8a7790.o platsmp-apmu.o
42smp-$(CONFIG_ARCH_R8A7791) += smp-r8a7791.o platsmp-apmu.o 45smp-$(CONFIG_ARCH_R8A7791) += smp-r8a7791.o platsmp-apmu.o
43smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o 46smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o
44 47
45# IRQ objects
46obj-$(CONFIG_ARCH_SH7372) += entry-intc.o
47
48# PM objects 48# PM objects
49obj-$(CONFIG_SUSPEND) += suspend.o 49obj-$(CONFIG_SUSPEND) += suspend.o
50obj-$(CONFIG_CPU_IDLE) += cpuidle.o 50obj-$(CONFIG_CPU_IDLE) += cpuidle.o
@@ -55,6 +55,9 @@ obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o pm-rcar.o
55obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o 55obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o
56obj-$(CONFIG_ARCH_R8A7791) += pm-r8a7791.o pm-rcar.o 56obj-$(CONFIG_ARCH_R8A7791) += pm-r8a7791.o pm-rcar.o
57 57
58# IRQ objects
59obj-$(CONFIG_ARCH_SH7372) += entry-intc.o
60
58# Board objects 61# Board objects
59ifdef CONFIG_ARCH_SHMOBILE_MULTI 62ifdef CONFIG_ARCH_SHMOBILE_MULTI
60obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o 63obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o
diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S
index e5be5c88644b..faf82144a262 100644
--- a/arch/arm/mach-shmobile/headsmp.S
+++ b/arch/arm/mach-shmobile/headsmp.S
@@ -10,14 +10,17 @@
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13#include <linux/linkage.h>
14#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/linkage.h>
15#include <linux/threads.h>
15#include <asm/memory.h> 16#include <asm/memory.h>
16 17
18#ifdef CONFIG_SMP
17ENTRY(shmobile_invalidate_start) 19ENTRY(shmobile_invalidate_start)
18 bl v7_invalidate_l1 20 bl v7_invalidate_l1
19 b secondary_startup 21 b secondary_startup
20ENDPROC(shmobile_invalidate_start) 22ENDPROC(shmobile_invalidate_start)
23#endif
21 24
22/* 25/*
23 * Reset vector for secondary CPUs. 26 * Reset vector for secondary CPUs.
@@ -68,7 +71,7 @@ shmobile_smp_boot_find_mpidr:
68 71
69shmobile_smp_boot_next: 72shmobile_smp_boot_next:
70 add r1, r1, #1 73 add r1, r1, #1
71 cmp r1, #CONFIG_NR_CPUS 74 cmp r1, #NR_CPUS
72 blo shmobile_smp_boot_find_mpidr 75 blo shmobile_smp_boot_find_mpidr
73 76
74 b shmobile_smp_sleep 77 b shmobile_smp_sleep
@@ -85,10 +88,10 @@ ENDPROC(shmobile_smp_sleep)
85 88
86 .globl shmobile_smp_mpidr 89 .globl shmobile_smp_mpidr
87shmobile_smp_mpidr: 90shmobile_smp_mpidr:
881: .space CONFIG_NR_CPUS * 4 911: .space NR_CPUS * 4
89 .globl shmobile_smp_fn 92 .globl shmobile_smp_fn
90shmobile_smp_fn: 93shmobile_smp_fn:
912: .space CONFIG_NR_CPUS * 4 942: .space NR_CPUS * 4
92 .globl shmobile_smp_arg 95 .globl shmobile_smp_arg
93shmobile_smp_arg: 96shmobile_smp_arg:
943: .space CONFIG_NR_CPUS * 4 973: .space NR_CPUS * 4