From: Haojian Zhuang Date: Wed, 24 Nov 2010 03:54:23 +0000 (+0800) Subject: ARM: pxa: auto compute shift and mult of timer X-Git-Tag: v2.6.39-rc2~40^2^2~1^2~17 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ccc46e29a63c88aa9ac72aac86ff0cfd5c627a11;p=karo-tx-linux.git 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: Haojian Zhuang Cc: Nicolas Pitre Signed-off-by: Eric Miao --- diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index e7f64d9b4f2d..428da3ff33a5 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c @@ -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 = { .name = "osmr0", .features = CLOCK_EVT_FEAT_ONESHOT, - .shift = 32, .rating = 200, .set_next_event = pxa_osmr0_set_next_event, .set_mode = pxa_osmr0_set_mode, @@ -135,8 +134,8 @@ static void __init pxa_timer_init(void) init_sched_clock(&cd, pxa_update_sched_clock, 32, clock_tick_rate); - ckevt_pxa_osmr0.mult = - div_sc(clock_tick_rate, NSEC_PER_SEC, ckevt_pxa_osmr0.shift); + clocksource_calc_mult_shift(&cksrc_pxa_oscr0, clock_tick_rate, 4); + clockevents_calc_mult_shift(&ckevt_pxa_osmr0, clock_tick_rate, 4); ckevt_pxa_osmr0.max_delta_ns = clockevent_delta2ns(0x7fffffff, &ckevt_pxa_osmr0); ckevt_pxa_osmr0.min_delta_ns =