提交 ccc46e29 编写于 作者: H Haojian Zhuang 提交者: Eric Miao

ARM: pxa: auto compute shift and mult of timer

Use auto-computed shift and mult of timer with new API
clocksource_calc_mult_shift()/clockevents_calc_mult_shift().
Signed-off-by: NHaojian Zhuang <haojian.zhuang@marvell.com>
Cc: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: NEric Miao <eric.y.miao@gmail.com>
上级 4321e1a1
...@@ -100,7 +100,6 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev) ...@@ -100,7 +100,6 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev)
static struct clock_event_device ckevt_pxa_osmr0 = { static struct clock_event_device ckevt_pxa_osmr0 = {
.name = "osmr0", .name = "osmr0",
.features = CLOCK_EVT_FEAT_ONESHOT, .features = CLOCK_EVT_FEAT_ONESHOT,
.shift = 32,
.rating = 200, .rating = 200,
.set_next_event = pxa_osmr0_set_next_event, .set_next_event = pxa_osmr0_set_next_event,
.set_mode = pxa_osmr0_set_mode, .set_mode = pxa_osmr0_set_mode,
...@@ -135,8 +134,8 @@ static void __init pxa_timer_init(void) ...@@ -135,8 +134,8 @@ static void __init pxa_timer_init(void)
init_sched_clock(&cd, pxa_update_sched_clock, 32, clock_tick_rate); init_sched_clock(&cd, pxa_update_sched_clock, 32, clock_tick_rate);
ckevt_pxa_osmr0.mult = clocksource_calc_mult_shift(&cksrc_pxa_oscr0, clock_tick_rate, 4);
div_sc(clock_tick_rate, NSEC_PER_SEC, ckevt_pxa_osmr0.shift); clockevents_calc_mult_shift(&ckevt_pxa_osmr0, clock_tick_rate, 4);
ckevt_pxa_osmr0.max_delta_ns = ckevt_pxa_osmr0.max_delta_ns =
clockevent_delta2ns(0x7fffffff, &ckevt_pxa_osmr0); clockevent_delta2ns(0x7fffffff, &ckevt_pxa_osmr0);
ckevt_pxa_osmr0.min_delta_ns = ckevt_pxa_osmr0.min_delta_ns =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册