diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2011-09-08 08:15:22 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-09-14 05:14:58 -0400 |
commit | a62580e58065dc00430b16ced6e7a00837b8323f (patch) | |
tree | d3ec9d533870478e86a2cb5f0fefc937fca7cbfc /arch/arm/mach-shmobile/include/mach | |
parent | 5ac21a943e4052ef6743b09b6a06fbb683a3519d (diff) |
ARM: SoC: convert shmobile SMP to SMP operations
Convert shmobile SMP platforms to use struct smp_operations to provide
their SMP and CPU hotplug operations.
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-shmobile/include/mach')
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/common.h | 24 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/emev2.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/r8a7779.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/sh73a0.h | 2 |
4 files changed, 18 insertions, 17 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 45e61dada030..f80f9c549393 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -4,11 +4,10 @@ | |||
4 | extern void shmobile_earlytimer_init(void); | 4 | extern void shmobile_earlytimer_init(void); |
5 | extern struct sys_timer shmobile_timer; | 5 | extern struct sys_timer shmobile_timer; |
6 | extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz, | 6 | extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz, |
7 | unsigned int mult, unsigned int div); | 7 | unsigned int mult, unsigned int div); |
8 | struct twd_local_timer; | 8 | struct twd_local_timer; |
9 | extern void shmobile_setup_console(void); | 9 | extern void shmobile_setup_console(void); |
10 | extern void shmobile_secondary_vector(void); | 10 | extern void shmobile_secondary_vector(void); |
11 | extern int shmobile_platform_cpu_kill(unsigned int cpu); | ||
12 | struct clk; | 11 | struct clk; |
13 | extern int shmobile_clk_init(void); | 12 | extern int shmobile_clk_init(void); |
14 | extern void shmobile_handle_irq_intc(struct pt_regs *); | 13 | extern void shmobile_handle_irq_intc(struct pt_regs *); |
@@ -58,11 +57,6 @@ extern struct clk sh73a0_extal2_clk; | |||
58 | extern struct clk sh73a0_extcki_clk; | 57 | extern struct clk sh73a0_extcki_clk; |
59 | extern struct clk sh73a0_extalr_clk; | 58 | extern struct clk sh73a0_extalr_clk; |
60 | 59 | ||
61 | extern unsigned int sh73a0_get_core_count(void); | ||
62 | extern void sh73a0_secondary_init(unsigned int cpu); | ||
63 | extern int sh73a0_boot_secondary(unsigned int cpu); | ||
64 | extern void sh73a0_smp_prepare_cpus(void); | ||
65 | |||
66 | extern void r8a7740_init_irq(void); | 60 | extern void r8a7740_init_irq(void); |
67 | extern void r8a7740_map_io(void); | 61 | extern void r8a7740_map_io(void); |
68 | extern void r8a7740_add_early_devices(void); | 62 | extern void r8a7740_add_early_devices(void); |
@@ -79,11 +73,6 @@ extern void r8a7779_pinmux_init(void); | |||
79 | extern void r8a7779_pm_init(void); | 73 | extern void r8a7779_pm_init(void); |
80 | extern void r8a7740_meram_workaround(void); | 74 | extern void r8a7740_meram_workaround(void); |
81 | 75 | ||
82 | extern unsigned int r8a7779_get_core_count(void); | ||
83 | extern int r8a7779_platform_cpu_kill(unsigned int cpu); | ||
84 | extern void r8a7779_secondary_init(unsigned int cpu); | ||
85 | extern int r8a7779_boot_secondary(unsigned int cpu); | ||
86 | extern void r8a7779_smp_prepare_cpus(void); | ||
87 | extern void r8a7779_register_twd(void); | 76 | extern void r8a7779_register_twd(void); |
88 | 77 | ||
89 | extern void shmobile_init_late(void); | 78 | extern void shmobile_init_late(void); |
@@ -100,4 +89,15 @@ int shmobile_cpuidle_init(void); | |||
100 | static inline int shmobile_cpuidle_init(void) { return 0; } | 89 | static inline int shmobile_cpuidle_init(void) { return 0; } |
101 | #endif | 90 | #endif |
102 | 91 | ||
92 | extern void shmobile_cpu_die(unsigned int cpu); | ||
93 | extern int shmobile_cpu_disable(unsigned int cpu); | ||
94 | |||
95 | #ifdef CONFIG_HOTPLUG_CPU | ||
96 | extern int shmobile_cpu_is_dead(unsigned int cpu); | ||
97 | #else | ||
98 | static inline int shmobile_cpu_is_dead(unsigned int cpu) { return 1; } | ||
99 | #endif | ||
100 | |||
101 | extern void shmobile_smp_init_cpus(unsigned int ncores); | ||
102 | |||
103 | #endif /* __ARCH_MACH_COMMON_H */ | 103 | #endif /* __ARCH_MACH_COMMON_H */ |
diff --git a/arch/arm/mach-shmobile/include/mach/emev2.h b/arch/arm/mach-shmobile/include/mach/emev2.h index e6b0c1bf4b7e..ac3751705cab 100644 --- a/arch/arm/mach-shmobile/include/mach/emev2.h +++ b/arch/arm/mach-shmobile/include/mach/emev2.h | |||
@@ -7,13 +7,10 @@ extern void emev2_add_early_devices(void); | |||
7 | extern void emev2_add_standard_devices(void); | 7 | extern void emev2_add_standard_devices(void); |
8 | extern void emev2_clock_init(void); | 8 | extern void emev2_clock_init(void); |
9 | extern void emev2_set_boot_vector(unsigned long value); | 9 | extern void emev2_set_boot_vector(unsigned long value); |
10 | extern unsigned int emev2_get_core_count(void); | ||
11 | extern int emev2_platform_cpu_kill(unsigned int cpu); | ||
12 | extern void emev2_secondary_init(unsigned int cpu); | ||
13 | extern int emev2_boot_secondary(unsigned int cpu); | ||
14 | extern void emev2_smp_prepare_cpus(void); | ||
15 | 10 | ||
16 | #define EMEV2_GPIO_BASE 200 | 11 | #define EMEV2_GPIO_BASE 200 |
17 | #define EMEV2_GPIO_IRQ(n) (EMEV2_GPIO_BASE + (n)) | 12 | #define EMEV2_GPIO_IRQ(n) (EMEV2_GPIO_BASE + (n)) |
18 | 13 | ||
14 | extern struct smp_operations emev2_smp_ops; | ||
15 | |||
19 | #endif /* __ASM_EMEV2_H__ */ | 16 | #endif /* __ASM_EMEV2_H__ */ |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h index b07ad318eb2e..f504c5e81b47 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h | |||
@@ -360,4 +360,6 @@ extern void r8a7779_add_device_to_domain(struct r8a7779_pm_domain *r8a7779_pd, | |||
360 | #define r8a7779_add_device_to_domain(pd, pdev) do { } while (0) | 360 | #define r8a7779_add_device_to_domain(pd, pdev) do { } while (0) |
361 | #endif /* CONFIG_PM */ | 361 | #endif /* CONFIG_PM */ |
362 | 362 | ||
363 | extern struct smp_operations r8a7779_smp_ops; | ||
364 | |||
363 | #endif /* __ASM_R8A7779_H__ */ | 365 | #endif /* __ASM_R8A7779_H__ */ |
diff --git a/arch/arm/mach-shmobile/include/mach/sh73a0.h b/arch/arm/mach-shmobile/include/mach/sh73a0.h index fe950f25d793..606d31d02a4e 100644 --- a/arch/arm/mach-shmobile/include/mach/sh73a0.h +++ b/arch/arm/mach-shmobile/include/mach/sh73a0.h | |||
@@ -557,4 +557,6 @@ enum { | |||
557 | #define SH73A0_PINT0_IRQ(irq) ((irq) + 700) | 557 | #define SH73A0_PINT0_IRQ(irq) ((irq) + 700) |
558 | #define SH73A0_PINT1_IRQ(irq) ((irq) + 732) | 558 | #define SH73A0_PINT1_IRQ(irq) ((irq) + 732) |
559 | 559 | ||
560 | extern struct smp_operations sh73a0_smp_ops; | ||
561 | |||
560 | #endif /* __ASM_SH73A0_H__ */ | 562 | #endif /* __ASM_SH73A0_H__ */ |