aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/hotplug.c
diff options
context:
space:
mode:
authorJoseph Lo <josephl@nvidia.com>2013-01-03 14:43:00 +0800
committerStephen Warren <swarren@nvidia.com>2013-01-28 10:21:48 -0700
commitb811943160cf3b040341c50d23440cf6d68ae079 (patch)
tree62fead24de686ce4f8f12e27846d05fa6aa85089 /arch/arm/mach-tegra/hotplug.c
parentARM: tegra: update the cache maintenance order for CPU shutdown (diff)
downloadlinux-dev-b811943160cf3b040341c50d23440cf6d68ae079.tar.xz
linux-dev-b811943160cf3b040341c50d23440cf6d68ae079.zip
ARM: tegra: moving the clock gating procedure to tegra_cpu_kill
The tegra_cpu_die was be executed by the CPU itslf. So the clock gating procedure won't be executed after the CPU hardware shutdown code. Moving the clock gating procedure to tegra_cpu_kill that will be run by another CPU after the CPU died. Signed-off-by: Joseph Lo <josephl@nvidia.com> Acked-by: Peter De Schrijver <pdeschrijver@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/hotplug.c')
-rw-r--r--arch/arm/mach-tegra/hotplug.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c
index d8c683b875d1..6a27de4001ee 100644
--- a/arch/arm/mach-tegra/hotplug.c
+++ b/arch/arm/mach-tegra/hotplug.c
@@ -19,6 +19,17 @@
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
*
@@ -26,18 +37,12 @@ static void (*tegra_hotplug_shutdown)(void);
*/
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();
}