Revert "ARM: tegra: moving the clock gating procedure to tegra_cpu_kill"
Dan Willemsen [Mon, 29 Jul 2013 20:38:14 +0000 (13:38 -0700)]
This reverts commit b811943160cf3b040341c50d23440cf6d68ae079.

Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>

arch/arm/mach-tegra/common.h
arch/arm/mach-tegra/hotplug.c
arch/arm/mach-tegra/platsmp.c

index 5900cc4..301b35e 100644 (file)
@@ -1,4 +1,3 @@
 extern struct smp_operations tegra_smp_ops;
 
-extern int tegra_cpu_kill(unsigned int cpu);
 extern void tegra_cpu_die(unsigned int cpu);
index 1fb9915..13f170b 100644 (file)
 
 static void (*tegra_hotplug_shutdown)(void);
 
-int tegra_cpu_kill(unsigned cpu)
-{
-       cpu = cpu_logical_map(cpu);
-
-       /* Clock gate the CPU */
-       tegra_wait_cpu_in_reset(cpu);
-       tegra_disable_cpu_clock(cpu);
-
-       return 1;
-}
-
 /*
  * platform-specific code to shutdown a CPU
  *
@@ -37,12 +26,18 @@ int tegra_cpu_kill(unsigned cpu)
  */
 void __ref tegra_cpu_die(unsigned int cpu)
 {
+       cpu = cpu_logical_map(cpu);
+
        /* Clean L1 data cache */
        tegra_disable_clean_inv_dcache();
 
        /* Shut down the current CPU. */
        tegra_hotplug_shutdown();
 
+       /* Clock gate the CPU */
+       tegra_wait_cpu_in_reset(cpu);
+       tegra_disable_cpu_clock(cpu);
+
        /* Should never return here. */
        BUG();
 }
index 655a383..7c7d9b8 100644 (file)
@@ -205,7 +205,6 @@ struct smp_operations tegra_smp_ops __initdata = {
        .smp_secondary_init     = tegra_secondary_init,
        .smp_boot_secondary     = tegra_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
-       .cpu_kill               = tegra_cpu_kill,
        .cpu_die                = tegra_cpu_die,
 #endif
 };