summaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile/platsmp.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2012-01-10 08:44:39 (GMT)
committerPaul Mundt <lethal@linux-sh.org>2012-01-12 02:00:27 (GMT)
commitf40aaf6da14a4043d6361e0c7d74ada18e866059 (patch)
tree655a02f6a7a0ef50772c13c00fef992924bdeb78 /arch/arm/mach-shmobile/platsmp.c
parentf0a217a31a745421df98db0d14ebdadef11d734c (diff)
downloadlinux-f40aaf6da14a4043d6361e0c7d74ada18e866059.tar.xz
ARM: mach-shmobile: r8a7779 SMP support V3
This patch contains r8a7779 SMP support V3 - now including CPU hotplug offine and online support. The r8a7779 power domain code is tied together with SMP glue code which allows us to control the power domains via CPU hotplug. At this point the kernel boots with the 4 Cortex-A9 cores in SMP mode and all CPU cores except CPU0 can be hotplugged. The code in platsmp.c is quite far from pretty, but it is kept like that intentionally to avoid creating layers of code that will go away in the near future anyway. The code needs to be updated when some per-SoC handling code will be added to the ARM architecture, see the following patch for more information: "[RFC PATCH 0/3] Per SoC descriptor" Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/platsmp.c')
-rw-r--r--arch/arm/mach-shmobile/platsmp.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c
index 3f3325d..9933812 100644
--- a/arch/arm/mach-shmobile/platsmp.c
+++ b/arch/arm/mach-shmobile/platsmp.c
@@ -22,12 +22,16 @@
#include <mach/common.h>
#define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2())
+#define is_r8a7779() machine_is_marzen()
static unsigned int __init shmobile_smp_get_core_count(void)
{
if (is_sh73a0())
return sh73a0_get_core_count();
+ if (is_r8a7779())
+ return r8a7779_get_core_count();
+
return 1;
}
@@ -35,10 +39,16 @@ static void __init shmobile_smp_prepare_cpus(void)
{
if (is_sh73a0())
sh73a0_smp_prepare_cpus();
+
+ if (is_r8a7779())
+ r8a7779_smp_prepare_cpus();
}
int shmobile_platform_cpu_kill(unsigned int cpu)
{
+ if (is_r8a7779())
+ return r8a7779_platform_cpu_kill(cpu);
+
return 1;
}
@@ -48,6 +58,9 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
if (is_sh73a0())
sh73a0_secondary_init(cpu);
+
+ if (is_r8a7779())
+ r8a7779_secondary_init(cpu);
}
int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
@@ -55,6 +68,9 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
if (is_sh73a0())
return sh73a0_boot_secondary(cpu);
+ if (is_r8a7779())
+ return r8a7779_boot_secondary(cpu);
+
return -ENOSYS;
}