mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-23 11:04:44 +08:00
ARM: MSM: 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.
Tested-By: Jeff Ohlstein <johlstei@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
5975f496e0
commit
ff9c977248
@ -137,7 +137,6 @@ static struct msm_clock msm_clocks[] = {
|
|||||||
.rating = 200,
|
.rating = 200,
|
||||||
.read = msm_gpt_read,
|
.read = msm_gpt_read,
|
||||||
.mask = CLOCKSOURCE_MASK(32),
|
.mask = CLOCKSOURCE_MASK(32),
|
||||||
.shift = 17,
|
|
||||||
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||||
},
|
},
|
||||||
.irq = {
|
.irq = {
|
||||||
@ -164,7 +163,6 @@ static struct msm_clock msm_clocks[] = {
|
|||||||
.rating = 300,
|
.rating = 300,
|
||||||
.read = msm_dgt_read,
|
.read = msm_dgt_read,
|
||||||
.mask = CLOCKSOURCE_MASK((32 - MSM_DGT_SHIFT)),
|
.mask = CLOCKSOURCE_MASK((32 - MSM_DGT_SHIFT)),
|
||||||
.shift = 24 - MSM_DGT_SHIFT,
|
|
||||||
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||||
},
|
},
|
||||||
.irq = {
|
.irq = {
|
||||||
@ -205,8 +203,7 @@ static void __init msm_timer_init(void)
|
|||||||
ce->min_delta_ns = clockevent_delta2ns(4, ce);
|
ce->min_delta_ns = clockevent_delta2ns(4, ce);
|
||||||
ce->cpumask = cpumask_of(0);
|
ce->cpumask = cpumask_of(0);
|
||||||
|
|
||||||
cs->mult = clocksource_hz2mult(clock->freq, cs->shift);
|
res = clocksource_register_hz(cs, clock->freq);
|
||||||
res = clocksource_register(cs);
|
|
||||||
if (res)
|
if (res)
|
||||||
printk(KERN_ERR "msm_timer_init: clocksource_register "
|
printk(KERN_ERR "msm_timer_init: clocksource_register "
|
||||||
"failed for %s\n", cs->name);
|
"failed for %s\n", cs->name);
|
||||||
|
Loading…
Reference in New Issue
Block a user