summaryrefslogtreecommitdiff
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorHuang, Tao <huangtao@rock-chips.com>2016-05-18 18:22:31 +0800
committerHuang, Tao <huangtao@rock-chips.com>2016-05-19 18:29:58 +0800
commitfb50410985e6f6874dcfe6e3f12b4bccd5d0335b (patch)
tree6bddc371d5b8a45db879ed947b7cd1a14c1b98c0 /drivers/clocksource
parentc380160aeae8b786868bd8483b9c1c9f22d15b61 (diff)
clocksource: rockchip: add dynamic irq flag to the timer
The rockchip timer is broadcast timer. Add CLOCK_EVT_FEAT_DYNIRQ flag and set cpumask to all cpu to save power by avoid unnecessary wakeups and IPIs. Change-Id: Ie257972a4a42f6807aed22df695d8b3a4d715045 Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Diffstat (limited to 'drivers/clocksource')
-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 b93fed6533c6..f3dfb1a1a610 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)
}
ce->name = TIMER_NAME;
- ce->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
+ ce->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT |
+ CLOCK_EVT_FEAT_DYNIRQ;
ce->set_next_event = rk_timer_set_next_event;
ce->set_state_shutdown = rk_timer_shutdown;
ce->set_state_periodic = rk_timer_set_periodic;
ce->irq = irq;
- ce->cpumask = cpumask_of(0);
+ ce->cpumask = cpu_all_mask;
ce->rating = 250;
ret = request_irq(irq, rk_timer_interrupt, IRQF_TIMER, TIMER_NAME, ce);