aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2013-03-21 08:21:33 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-03-31 19:10:27 -0400
commit8de46eff656f028b120971ba0edabaab09d854f2 (patch)
tree7326da8eb6e0b8b99dcb996bdb539b2a565212c0
parentcb7094e848f7bcaa0a4cda3db4b232f08dbf5b78 (diff)
cpuidle / imx6 : use CPUIDLE_FLAG_TIMER_STOP flag
Use the CPUIDLE_FLAG_TIMER_STOP and let the cpuidle framework to handle the CLOCK_EVT_NOTIFY_BROADCAST_ENTER/EXIT when entering this state. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--arch/arm/mach-imx/cpuidle-imx6q.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c
index d533e2695f0e..5ae22f701813 100644
--- a/arch/arm/mach-imx/cpuidle-imx6q.c
+++ b/arch/arm/mach-imx/cpuidle-imx6q.c
@@ -21,10 +21,6 @@ static DEFINE_SPINLOCK(master_lock);
21static int imx6q_enter_wait(struct cpuidle_device *dev, 21static int imx6q_enter_wait(struct cpuidle_device *dev,
22 struct cpuidle_driver *drv, int index) 22 struct cpuidle_driver *drv, int index)
23{ 23{
24 int cpu = dev->cpu;
25
26 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
27
28 if (atomic_inc_return(&master) == num_online_cpus()) { 24 if (atomic_inc_return(&master) == num_online_cpus()) {
29 /* 25 /*
30 * With this lock, we prevent other cpu to exit and enter 26 * With this lock, we prevent other cpu to exit and enter
@@ -43,7 +39,6 @@ idle:
43 cpu_do_idle(); 39 cpu_do_idle();
44done: 40done:
45 atomic_dec(&master); 41 atomic_dec(&master);
46 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
47 42
48 return index; 43 return index;
49} 44}
@@ -70,7 +65,8 @@ static struct cpuidle_driver imx6q_cpuidle_driver = {
70 { 65 {
71 .exit_latency = 50, 66 .exit_latency = 50,
72 .target_residency = 75, 67 .target_residency = 75,
73 .flags = CPUIDLE_FLAG_TIME_VALID, 68 .flags = CPUIDLE_FLAG_TIME_VALID |
69 CPUIDLE_FLAG_TIMER_STOP,
74 .enter = imx6q_enter_wait, 70 .enter = imx6q_enter_wait,
75 .name = "WAIT", 71 .name = "WAIT",
76 .desc = "Clock off", 72 .desc = "Clock off",