Skip to contentSkip to conversation

ARM: shmobile: sh73a0: Rely on DT for SMP CPU info

PATCH New Magnus Damm 2 participants 2 messages Jul 24, 2013 – Jul 26, 2013

Subsystems (4)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

PATCH 1/1 ARM: shmobile: sh73a0: Rely on DT for SMP CPU info

From: Magnus Damm <[email protected]>

Remove sh73a0 specific ->smp_init_cpus() callback and instead of relying on shmobile_smp_init_cpus() simply use DT for CPU core information.

This assumes that DT_MACHINE_START is used which is the case when AG5EVM and Kota2 are removed.

---

 arch/arm/mach-shmobile/smp-sh73a0.c |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
arch/arm/mach-shmobile/smp-sh73a0.c +2 -9
@@ -62,6 +62,8 @@ static int sh73a0_boot_secondary(unsigne
 
 static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
 {
+	/* setup sh73a0 specific SCU base */
+	shmobile_scu_base = IOMEM(SH73A0_SCU_BASE);
 	scu_enable(shmobile_scu_base);
 
 	/* Map the reset vector (in headsmp-scu.S, headsmp.S) */
@@ -74,14 +76,6 @@ static void __init sh73a0_smp_prepare_cp
 	scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL);
 }
 
-static void __init sh73a0_smp_init_cpus(void)
-{
-	/* setup sh73a0 specific SCU base */
-	shmobile_scu_base = IOMEM(SH73A0_SCU_BASE);
-
-	shmobile_smp_init_cpus(scu_get_core_count(shmobile_scu_base));
-}
-
 #ifdef CONFIG_HOTPLUG_CPU
 static int sh73a0_cpu_kill(unsigned int cpu)
 {
@@ -120,7 +114,6 @@ static int sh73a0_cpu_disable(unsigned i
 #endif /* CONFIG_HOTPLUG_CPU */
 
 struct smp_operations sh73a0_smp_ops __initdata = {
-	.smp_init_cpus		= sh73a0_smp_init_cpus,
 	.smp_prepare_cpus	= sh73a0_smp_prepare_cpus,
 	.smp_boot_secondary	= sh73a0_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
#1 lore raw

PATCH 1/1 ARM: shmobile: sh73a0: Rely on DT for SMP CPU info

Quoted 8 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Remove sh73a0 specific ->smp_init_cpus() callback and instead of relying on shmobile_smp_init_cpus() simply use DT for CPU core information.

This assumes that DT_MACHINE_START is used which is the case when AG5EVM and Kota2 are removed.

And indeed they are queued-up for removal.

I have queued-up this patch for v3.12 in the dt2 branch.

Quoted 45 lines

---

 arch/arm/mach-shmobile/smp-sh73a0.c |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
arch/arm/mach-shmobile/smp-sh73a0.c +2 -10
@@ -62,6 +62,8 @@ static int sh73a0_boot_secondary(unsigne
 
 static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
 {
+	/* setup sh73a0 specific SCU base */
+	shmobile_scu_base = IOMEM(SH73A0_SCU_BASE);
 	scu_enable(shmobile_scu_base);
 
 	/* Map the reset vector (in headsmp-scu.S, headsmp.S) */
@@ -74,14 +76,6 @@ static void __init sh73a0_smp_prepare_cp
 	scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL);
 }
 
-static void __init sh73a0_smp_init_cpus(void)
-{
-	/* setup sh73a0 specific SCU base */
-	shmobile_scu_base = IOMEM(SH73A0_SCU_BASE);
-
-	shmobile_smp_init_cpus(scu_get_core_count(shmobile_scu_base));
-}
-
 #ifdef CONFIG_HOTPLUG_CPU
 static int sh73a0_cpu_kill(unsigned int cpu)
 {
@@ -120,7 +114,6 @@ static int sh73a0_cpu_disable(unsigned i
 #endif /* CONFIG_HOTPLUG_CPU */
 
 struct smp_operations sh73a0_smp_ops __initdata = {
-	.smp_init_cpus		= sh73a0_smp_init_cpus,
 	.smp_prepare_cpus	= sh73a0_smp_prepare_cpus,
 	.smp_boot_secondary	= sh73a0_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
--

To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html