SUPERH platform development
 help / color / mirror / Atom feed
* [PATCH 04/06] ARM: shmobile: Also build APMU code for non-SMP r8a7790
@ 2014-03-16 21:35 Magnus Damm
  0 siblings, 0 replies; only message in thread
From: Magnus Damm @ 2014-03-16 21:35 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm@opensource.se>

Build APMU code on r8a7790 when CPUIdle is enabled regardless
if SMP is enabled or not.

Not-Yet-Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/Makefile       |    1 +
 arch/arm/mach-shmobile/platsmp-apmu.c |    4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

--- 0003/arch/arm/mach-shmobile/Makefile
+++ work/arch/arm/mach-shmobile/Makefile
@@ -55,6 +55,7 @@ obj-$(CONFIG_ARCH_R8A7790)	+= pm-r8a7790
 
 # CPU PM objects
 cpu-y				:= cpuidle.o platsmp.o headsmp.o
+cpu-$(CONFIG_ARCH_R8A7790)	+= platsmp-apmu.o
 
 # Board objects
 ifdef CONFIG_ARCH_SHMOBILE_MULTI
--- 0001/arch/arm/mach-shmobile/platsmp-apmu.c
+++ work/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -69,7 +69,7 @@ static int apmu_wrap(int cpu, int (*fn)(
 
 static void apmu_init_cpu(struct resource *res, int cpu, int bit)
 {
-	if (apmu_cpus[cpu].iomem)
+	if ((cpu >= ARRAY_SIZE(apmu_cpus)) || apmu_cpus[cpu].iomem)
 		return;
 
 	apmu_cpus[cpu].iomem = ioremap_nocache(res->start, resource_size(res));
@@ -133,6 +133,7 @@ void __init shmobile_smp_apmu_prepare_cp
 	apmu_parse_cfg(apmu_init_cpu);
 }
 
+#ifdef CONFIG_SMP
 int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	/* For this particular CPU register boot vector */
@@ -140,6 +141,7 @@ int shmobile_smp_apmu_boot_secondary(uns
 
 	return apmu_wrap(cpu, apmu_power_on);
 }
+#endif
 
 #ifdef CONFIG_HOTPLUG_CPU
 /* nicked from arch/arm/mach-exynos/hotplug.c */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-16 21:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-16 21:35 [PATCH 04/06] ARM: shmobile: Also build APMU code for non-SMP r8a7790 Magnus Damm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox