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:15:00 -0400 |
commit | e4f2d97920f2256e5af035281e8ac35030493bf8 (patch) | |
tree | 8abfc534847e5d8368f0b3dfb637fde84e4f1f25 /arch/arm/mach-imx/platsmp.c | |
parent | 7ad71b61e744e7c565eec9e7aa734b0c42d93b16 (diff) |
ARM: SoC: convert imx6q to SMP operations
Convert the imx6q platform to use struct smp_operations to provide
its SMP and CPU hotplug operations.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-imx/platsmp.c')
-rw-r--r-- | arch/arm/mach-imx/platsmp.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c index ab98c6fec9eb..2ac43e1a2dfd 100644 --- a/arch/arm/mach-imx/platsmp.c +++ b/arch/arm/mach-imx/platsmp.c | |||
@@ -41,7 +41,7 @@ void __init imx_scu_map_io(void) | |||
41 | scu_base = IMX_IO_ADDRESS(base); | 41 | scu_base = IMX_IO_ADDRESS(base); |
42 | } | 42 | } |
43 | 43 | ||
44 | void __cpuinit platform_secondary_init(unsigned int cpu) | 44 | static void __cpuinit imx_secondary_init(unsigned int cpu) |
45 | { | 45 | { |
46 | /* | 46 | /* |
47 | * if any interrupts are already enabled for the primary | 47 | * if any interrupts are already enabled for the primary |
@@ -51,7 +51,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
51 | gic_secondary_init(0); | 51 | gic_secondary_init(0); |
52 | } | 52 | } |
53 | 53 | ||
54 | int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | 54 | static int __cpuinit imx_boot_secondary(unsigned int cpu, struct task_struct *idle) |
55 | { | 55 | { |
56 | imx_set_cpu_jump(cpu, v7_secondary_startup); | 56 | imx_set_cpu_jump(cpu, v7_secondary_startup); |
57 | imx_enable_cpu(cpu, true); | 57 | imx_enable_cpu(cpu, true); |
@@ -62,7 +62,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
62 | * Initialise the CPU possible map early - this describes the CPUs | 62 | * Initialise the CPU possible map early - this describes the CPUs |
63 | * which may be present or become present in the system. | 63 | * which may be present or become present in the system. |
64 | */ | 64 | */ |
65 | void __init smp_init_cpus(void) | 65 | static void __init imx_smp_init_cpus(void) |
66 | { | 66 | { |
67 | int i, ncores; | 67 | int i, ncores; |
68 | 68 | ||
@@ -79,7 +79,17 @@ void imx_smp_prepare(void) | |||
79 | scu_enable(scu_base); | 79 | scu_enable(scu_base); |
80 | } | 80 | } |
81 | 81 | ||
82 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) | 82 | static void __init imx_smp_prepare_cpus(unsigned int max_cpus) |
83 | { | 83 | { |
84 | imx_smp_prepare(); | 84 | imx_smp_prepare(); |
85 | } | 85 | } |
86 | |||
87 | struct smp_operations imx_smp_ops __initdata = { | ||
88 | .smp_init_cpus = imx_smp_init_cpus, | ||
89 | .smp_prepare_cpus = imx_smp_prepare_cpus, | ||
90 | .smp_secondary_init = imx_secondary_init, | ||
91 | .smp_boot_secondary = imx_boot_secondary, | ||
92 | #ifdef CONFIG_HOTPLUG_CPU | ||
93 | .cpu_die = imx_cpu_die, | ||
94 | #endif | ||
95 | }; | ||