diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-13 08:21:41 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-22 17:44:41 -0500 |
commit | 2218543fe0c40ce36fa165c5003072cc8b236c34 (patch) | |
tree | 22dcac723f89dd0631f3d95c8113dfefd42b92fd /arch/arm/plat-stmp3xxx | |
parent | 1d0ac3cdf3d31ba84499c3a914aa2b54eecbf2af (diff) |
ARM: stmp: update clock source registration
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants. Switch over to using this new interface.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-stmp3xxx')
-rw-r--r-- | arch/arm/plat-stmp3xxx/timer.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/arm/plat-stmp3xxx/timer.c b/arch/arm/plat-stmp3xxx/timer.c index 063c7bc0e740..c395630a6edc 100644 --- a/arch/arm/plat-stmp3xxx/timer.c +++ b/arch/arm/plat-stmp3xxx/timer.c | |||
@@ -89,7 +89,6 @@ static struct clocksource cksrc_stmp3xxx = { | |||
89 | .rating = 250, | 89 | .rating = 250, |
90 | .read = stmp3xxx_clock_read, | 90 | .read = stmp3xxx_clock_read, |
91 | .mask = CLOCKSOURCE_MASK(16), | 91 | .mask = CLOCKSOURCE_MASK(16), |
92 | .shift = 10, | ||
93 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 92 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
94 | }; | 93 | }; |
95 | 94 | ||
@@ -106,8 +105,6 @@ static struct irqaction stmp3xxx_timer_irq = { | |||
106 | */ | 105 | */ |
107 | static void __init stmp3xxx_init_timer(void) | 106 | static void __init stmp3xxx_init_timer(void) |
108 | { | 107 | { |
109 | cksrc_stmp3xxx.mult = clocksource_hz2mult(CLOCK_TICK_RATE, | ||
110 | cksrc_stmp3xxx.shift); | ||
111 | ckevt_timrot.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, | 108 | ckevt_timrot.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, |
112 | ckevt_timrot.shift); | 109 | ckevt_timrot.shift); |
113 | ckevt_timrot.min_delta_ns = clockevent_delta2ns(2, &ckevt_timrot); | 110 | ckevt_timrot.min_delta_ns = clockevent_delta2ns(2, &ckevt_timrot); |
@@ -140,7 +137,7 @@ static void __init stmp3xxx_init_timer(void) | |||
140 | 137 | ||
141 | setup_irq(IRQ_TIMER0, &stmp3xxx_timer_irq); | 138 | setup_irq(IRQ_TIMER0, &stmp3xxx_timer_irq); |
142 | 139 | ||
143 | clocksource_register(&cksrc_stmp3xxx); | 140 | clocksource_register_hz(&cksrc_stmp3xxx, CLOCK_TICK_RATE); |
144 | clockevents_register_device(&ckevt_timrot); | 141 | clockevents_register_device(&ckevt_timrot); |
145 | } | 142 | } |
146 | 143 | ||