mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-19 11:56:12 +07:00
ARM: mmp: 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>
This commit is contained in:
parent
594cbf2f4c
commit
5975f496e0
@ -146,7 +146,6 @@ static cycle_t clksrc_read(struct clocksource *cs)
|
|||||||
|
|
||||||
static struct clocksource cksrc = {
|
static struct clocksource cksrc = {
|
||||||
.name = "clocksource",
|
.name = "clocksource",
|
||||||
.shift = 20,
|
|
||||||
.rating = 200,
|
.rating = 200,
|
||||||
.read = clksrc_read,
|
.read = clksrc_read,
|
||||||
.mask = CLOCKSOURCE_MASK(32),
|
.mask = CLOCKSOURCE_MASK(32),
|
||||||
@ -193,10 +192,8 @@ void __init timer_init(int irq)
|
|||||||
ckevt.min_delta_ns = clockevent_delta2ns(MIN_DELTA, &ckevt);
|
ckevt.min_delta_ns = clockevent_delta2ns(MIN_DELTA, &ckevt);
|
||||||
ckevt.cpumask = cpumask_of(0);
|
ckevt.cpumask = cpumask_of(0);
|
||||||
|
|
||||||
cksrc.mult = clocksource_hz2mult(CLOCK_TICK_RATE, cksrc.shift);
|
|
||||||
|
|
||||||
setup_irq(irq, &timer_irq);
|
setup_irq(irq, &timer_irq);
|
||||||
|
|
||||||
clocksource_register(&cksrc);
|
clocksource_register_hz(&cksrc, CLOCK_TICK_RATE);
|
||||||
clockevents_register_device(&ckevt);
|
clockevents_register_device(&ckevt);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user