summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang, Tao <huangtao@rock-chips.com>2016-06-16 09:57:53 -0400
committerDaniel Lezcano <daniel.lezcano@linaro.org>2016-06-28 04:17:07 -0400
commit716897d90f2bb1b732c45ddcc1f2f4651a06a9f6 (patch)
tree02d0bc53d62123bc3a1cc328410e067e7f2b9934
parent85889876ca37d67c20d14e444b111c0b81744b3e (diff)
clocksource/drivers/rockchip: Add the dynamic irq flag to the timer
The rockchip timer is a broadcast timer. Add the CLOCK_EVT_FEAT_DYNIRQ flag and set the cpumask to all possible cpus to save power by avoiding unnecessary wakeups and IPIs. Signed-off-by: Huang Tao <huangtao@rock-chips.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Heiko Stuebner <heiko@sntech.de> Tested-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--drivers/clocksource/rockchip_timer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/clocksource/rockchip_timer.c b/drivers/clocksource/rockchip_timer.c
index b991b288c803..b510863fd1e1 100644
--- a/drivers/clocksource/rockchip_timer.c
+++ b/drivers/clocksource/rockchip_timer.c
@@ -150,12 +150,13 @@ static void __init rk_timer_init(struct device_node *np)
150 } 150 }
151 151
152 ce->name = TIMER_NAME; 152 ce->name = TIMER_NAME;
153 ce->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; 153 ce->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT |
154 CLOCK_EVT_FEAT_DYNIRQ;
154 ce->set_next_event = rk_timer_set_next_event; 155 ce->set_next_event = rk_timer_set_next_event;
155 ce->set_state_shutdown = rk_timer_shutdown; 156 ce->set_state_shutdown = rk_timer_shutdown;
156 ce->set_state_periodic = rk_timer_set_periodic; 157 ce->set_state_periodic = rk_timer_set_periodic;
157 ce->irq = irq; 158 ce->irq = irq;
158 ce->cpumask = cpumask_of(0); 159 ce->cpumask = cpu_possible_mask;
159 ce->rating = 250; 160 ce->rating = 250;
160 161
161 rk_timer_interrupt_clear(ce); 162 rk_timer_interrupt_clear(ce);