summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/cpuidle.c
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2011-07-21 18:24:34 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:46:57 -0800
commit3b3b17486113ac2e5af1f6d2d555f1315cb40434 (patch)
treea5943868a0be1de16024cba4c9e310b934847171 /arch/arm/mach-tegra/cpuidle.c
parentedd6779f31582fb6acdb59f58dfb4471fa4078d6 (diff)
ARM: tegra: power: Save TWD registers on cluster transitions
The ARM timer/watchdog (TWD) registers do not need saving on LP2 transitions resulting from real idle events. They do still need saving/restoring on transitions resulting from cluster control operations. Change-Id: I459b25b98c256a52a2e9e68fb63dbf2681e90b07 Signed-off-by: Scott Williams <scwilliams@nvidia.com> Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: R3c7c0cae8b847af6355fa1fa0b8bf5bf1e1efef5
Diffstat (limited to 'arch/arm/mach-tegra/cpuidle.c')
-rw-r--r--arch/arm/mach-tegra/cpuidle.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/cpuidle.c b/arch/arm/mach-tegra/cpuidle.c
index 820eba972a1b..73ed6d4e3a2f 100644
--- a/arch/arm/mach-tegra/cpuidle.c
+++ b/arch/arm/mach-tegra/cpuidle.c
@@ -135,8 +135,11 @@ static int tegra_idle_enter_lp2(struct cpuidle_device *dev,
tegra_cpu_idle_stats_lp2_ready(dev->cpu);
+ /* Shut down the CPU local timer and switch timekeeping to the
+ global system timer. */
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu);
tegra_idle_lp2(dev, state);
+ /* Switch timekeeping back to the CPU local timer. */
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu);
exit = ktime_sub(ktime_get(), enter);