提交 8de46eff 编写于 作者: D Daniel Lezcano 提交者: Rafael J. Wysocki

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: NDaniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 cb7094e8
...@@ -21,10 +21,6 @@ static DEFINE_SPINLOCK(master_lock); ...@@ -21,10 +21,6 @@ static DEFINE_SPINLOCK(master_lock);
static int imx6q_enter_wait(struct cpuidle_device *dev, static int imx6q_enter_wait(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index) struct cpuidle_driver *drv, int index)
{ {
int cpu = dev->cpu;
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
if (atomic_inc_return(&master) == num_online_cpus()) { if (atomic_inc_return(&master) == num_online_cpus()) {
/* /*
* With this lock, we prevent other cpu to exit and enter * With this lock, we prevent other cpu to exit and enter
...@@ -43,7 +39,6 @@ static int imx6q_enter_wait(struct cpuidle_device *dev, ...@@ -43,7 +39,6 @@ static int imx6q_enter_wait(struct cpuidle_device *dev,
cpu_do_idle(); cpu_do_idle();
done: done:
atomic_dec(&master); atomic_dec(&master);
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
return index; return index;
} }
...@@ -70,7 +65,8 @@ static struct cpuidle_driver imx6q_cpuidle_driver = { ...@@ -70,7 +65,8 @@ static struct cpuidle_driver imx6q_cpuidle_driver = {
{ {
.exit_latency = 50, .exit_latency = 50,
.target_residency = 75, .target_residency = 75,
.flags = CPUIDLE_FLAG_TIME_VALID, .flags = CPUIDLE_FLAG_TIME_VALID |
CPUIDLE_FLAG_TIMER_STOP,
.enter = imx6q_enter_wait, .enter = imx6q_enter_wait,
.name = "WAIT", .name = "WAIT",
.desc = "Clock off", .desc = "Clock off",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册