diff options
author | Olof Johansson <olof@lixom.net> | 2012-09-22 03:06:21 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-09-22 03:16:04 -0400 |
commit | 25468fe89f88c4ceeef94526e94ae0db176f6999 (patch) | |
tree | d70a713525281276b5063c814413bb3141e6056c /arch/arm/mach-tegra | |
parent | a283580c52d3aa24305985e945dfccfbcfc6f4f9 (diff) | |
parent | 28e8e29c616f947348cc66bea684d0035c76021a (diff) |
Merge branch 'multiplatform/smp_ops' into next/multiplatform
* multiplatform/smp_ops:
ARM: consolidate pen_release instead of having per platform definitions
ARM: smp: Make SMP operations mandatory
ARM: SoC: convert spear13xx to SMP operations
ARM: SoC: convert imx6q to SMP operations
ARM: SoC: convert highbank to SMP operations
ARM: SoC: convert shmobile SMP to SMP operations
ARM: SoC: convert ux500 to SMP operations
ARM: SoC: convert MSM to SMP operations
ARM: SoC: convert Exynos4 to SMP operations
ARM: SoC: convert Tegra to SMP operations
ARM: SoC: convert OMAP4 to SMP operations
ARM: SoC: convert VExpress/RealView to SMP operations
ARM: SoC: add per-platform SMP operations
Conflicts due to file moves or removals in:
arch/arm/mach-msm/board-msm8960.c
arch/arm/mach-msm/board-msm8x60.c
arch/arm/mach-tegra/board-harmony.c
arch/arm/mach-tegra/board-trimslice.c
Conflicts due to board file cleanup:
arch/arm/mach-tegra/board-paz00.c
Conflicts due to cpu hotplug addition:
arch/arm/mach-tegra/hotplug.c
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/board-dt-tegra20.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-dt-tegra30.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/common.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/common.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/hotplug.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-tegra/platsmp.c | 21 |
6 files changed, 28 insertions, 11 deletions
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c index 5957ffbd4af6..5d8c8fb060b0 100644 --- a/arch/arm/mach-tegra/board-dt-tegra20.c +++ b/arch/arm/mach-tegra/board-dt-tegra20.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include "board.h" | 44 | #include "board.h" |
45 | #include "clock.h" | 45 | #include "clock.h" |
46 | #include "devices.h" | 46 | #include "devices.h" |
47 | #include "common.h" | ||
47 | 48 | ||
48 | struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { | 49 | struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { |
49 | OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL), | 50 | OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL), |
@@ -152,6 +153,7 @@ static const char *tegra20_dt_board_compat[] = { | |||
152 | 153 | ||
153 | DT_MACHINE_START(TEGRA_DT, "nVidia Tegra20 (Flattened Device Tree)") | 154 | DT_MACHINE_START(TEGRA_DT, "nVidia Tegra20 (Flattened Device Tree)") |
154 | .map_io = tegra_map_common_io, | 155 | .map_io = tegra_map_common_io, |
156 | .smp = smp_ops(tegra_smp_ops), | ||
155 | .init_early = tegra20_init_early, | 157 | .init_early = tegra20_init_early, |
156 | .init_irq = tegra_dt_init_irq, | 158 | .init_irq = tegra_dt_init_irq, |
157 | .handle_irq = gic_handle_irq, | 159 | .handle_irq = gic_handle_irq, |
diff --git a/arch/arm/mach-tegra/board-dt-tegra30.c b/arch/arm/mach-tegra/board-dt-tegra30.c index 53bf60f11580..e4a676d4ddf7 100644 --- a/arch/arm/mach-tegra/board-dt-tegra30.c +++ b/arch/arm/mach-tegra/board-dt-tegra30.c | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | #include "board.h" | 38 | #include "board.h" |
39 | #include "clock.h" | 39 | #include "clock.h" |
40 | #include "common.h" | ||
40 | 41 | ||
41 | struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = { | 42 | struct of_dev_auxdata tegra30_auxdata_lookup[] __initdata = { |
42 | OF_DEV_AUXDATA("nvidia,tegra20-sdhci", 0x78000000, "sdhci-tegra.0", NULL), | 43 | OF_DEV_AUXDATA("nvidia,tegra20-sdhci", 0x78000000, "sdhci-tegra.0", NULL), |
@@ -83,6 +84,7 @@ static const char *tegra30_dt_board_compat[] = { | |||
83 | }; | 84 | }; |
84 | 85 | ||
85 | DT_MACHINE_START(TEGRA30_DT, "NVIDIA Tegra30 (Flattened Device Tree)") | 86 | DT_MACHINE_START(TEGRA30_DT, "NVIDIA Tegra30 (Flattened Device Tree)") |
87 | .smp = smp_ops(tegra_smp_ops), | ||
86 | .map_io = tegra_map_common_io, | 88 | .map_io = tegra_map_common_io, |
87 | .init_early = tegra30_init_early, | 89 | .init_early = tegra30_init_early, |
88 | .init_irq = tegra_dt_init_irq, | 90 | .init_irq = tegra_dt_init_irq, |
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index 0560538bf598..0b0a5f556d34 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | #include "board.h" | 32 | #include "board.h" |
33 | #include "clock.h" | 33 | #include "clock.h" |
34 | #include "common.h" | ||
34 | #include "fuse.h" | 35 | #include "fuse.h" |
35 | #include "pmc.h" | 36 | #include "pmc.h" |
36 | #include "apbio.h" | 37 | #include "apbio.h" |
diff --git a/arch/arm/mach-tegra/common.h b/arch/arm/mach-tegra/common.h new file mode 100644 index 000000000000..02f71b4f1e51 --- /dev/null +++ b/arch/arm/mach-tegra/common.h | |||
@@ -0,0 +1,4 @@ | |||
1 | extern struct smp_operations tegra_smp_ops; | ||
2 | |||
3 | extern void tegra_cpu_die(unsigned int cpu); | ||
4 | extern int tegra_cpu_disable(unsigned int cpu); | ||
diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c index d02a35476135..dca5141a2c31 100644 --- a/arch/arm/mach-tegra/hotplug.c +++ b/arch/arm/mach-tegra/hotplug.c | |||
@@ -19,17 +19,12 @@ | |||
19 | 19 | ||
20 | static void (*tegra_hotplug_shutdown)(void); | 20 | static void (*tegra_hotplug_shutdown)(void); |
21 | 21 | ||
22 | int platform_cpu_kill(unsigned int cpu) | ||
23 | { | ||
24 | return 1; | ||
25 | } | ||
26 | |||
27 | /* | 22 | /* |
28 | * platform-specific code to shutdown a CPU | 23 | * platform-specific code to shutdown a CPU |
29 | * | 24 | * |
30 | * Called with IRQs disabled | 25 | * Called with IRQs disabled |
31 | */ | 26 | */ |
32 | void platform_cpu_die(unsigned int cpu) | 27 | void __ref tegra_cpu_die(unsigned int cpu) |
33 | { | 28 | { |
34 | cpu = cpu_logical_map(cpu); | 29 | cpu = cpu_logical_map(cpu); |
35 | 30 | ||
@@ -47,7 +42,7 @@ void platform_cpu_die(unsigned int cpu) | |||
47 | BUG(); | 42 | BUG(); |
48 | } | 43 | } |
49 | 44 | ||
50 | int platform_cpu_disable(unsigned int cpu) | 45 | int tegra_cpu_disable(unsigned int cpu) |
51 | { | 46 | { |
52 | /* | 47 | /* |
53 | * we don't allow CPU 0 to be shutdown (it is still too special | 48 | * we don't allow CPU 0 to be shutdown (it is still too special |
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c index 96ed1718eef0..81cb26591acf 100644 --- a/arch/arm/mach-tegra/platsmp.c +++ b/arch/arm/mach-tegra/platsmp.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include "reset.h" | 33 | #include "reset.h" |
34 | #include "tegra_cpu_car.h" | 34 | #include "tegra_cpu_car.h" |
35 | 35 | ||
36 | #include "common.h" | ||
37 | |||
36 | extern void tegra_secondary_startup(void); | 38 | extern void tegra_secondary_startup(void); |
37 | 39 | ||
38 | static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE); | 40 | static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE); |
@@ -40,7 +42,7 @@ static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE); | |||
40 | #define EVP_CPU_RESET_VECTOR \ | 42 | #define EVP_CPU_RESET_VECTOR \ |
41 | (IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE) + 0x100) | 43 | (IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE) + 0x100) |
42 | 44 | ||
43 | void __cpuinit platform_secondary_init(unsigned int cpu) | 45 | static void __cpuinit tegra_secondary_init(unsigned int cpu) |
44 | { | 46 | { |
45 | /* | 47 | /* |
46 | * if any interrupts are already enabled for the primary | 48 | * if any interrupts are already enabled for the primary |
@@ -100,7 +102,7 @@ static int tegra30_power_up_cpu(unsigned int cpu) | |||
100 | return 0; | 102 | return 0; |
101 | } | 103 | } |
102 | 104 | ||
103 | int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | 105 | static int __cpuinit tegra_boot_secondary(unsigned int cpu, struct task_struct *idle) |
104 | { | 106 | { |
105 | int status; | 107 | int status; |
106 | 108 | ||
@@ -146,7 +148,7 @@ done: | |||
146 | * Initialise the CPU possible map early - this describes the CPUs | 148 | * Initialise the CPU possible map early - this describes the CPUs |
147 | * which may be present or become present in the system. | 149 | * which may be present or become present in the system. |
148 | */ | 150 | */ |
149 | void __init smp_init_cpus(void) | 151 | static void __init tegra_smp_init_cpus(void) |
150 | { | 152 | { |
151 | unsigned int i, ncores = scu_get_core_count(scu_base); | 153 | unsigned int i, ncores = scu_get_core_count(scu_base); |
152 | 154 | ||
@@ -162,8 +164,19 @@ void __init smp_init_cpus(void) | |||
162 | set_smp_cross_call(gic_raise_softirq); | 164 | set_smp_cross_call(gic_raise_softirq); |
163 | } | 165 | } |
164 | 166 | ||
165 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) | 167 | static void __init tegra_smp_prepare_cpus(unsigned int max_cpus) |
166 | { | 168 | { |
167 | tegra_cpu_reset_handler_init(); | 169 | tegra_cpu_reset_handler_init(); |
168 | scu_enable(scu_base); | 170 | scu_enable(scu_base); |
169 | } | 171 | } |
172 | |||
173 | struct smp_operations tegra_smp_ops __initdata = { | ||
174 | .smp_init_cpus = tegra_smp_init_cpus, | ||
175 | .smp_prepare_cpus = tegra_smp_prepare_cpus, | ||
176 | .smp_secondary_init = tegra_secondary_init, | ||
177 | .smp_boot_secondary = tegra_boot_secondary, | ||
178 | #ifdef CONFIG_HOTPLUG_CPU | ||
179 | .cpu_die = tegra_cpu_die, | ||
180 | .cpu_disable = tegra_cpu_disable, | ||
181 | #endif | ||
182 | }; | ||