mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
ARM: fix footbridge clockevent device
commit 4ff859fe1dc0da0f87bbdfff78f527898878fa4a upstream.
The clockevents code was being told that the footbridge clock event
device ticks at 16x the rate which it actually does. This leads to
timekeeping problems since it allows the clocksource to wrap before
the kernel notices. Fix this by using the correct clock.
Fixes: 4e8d76373c
("ARM: footbridge: convert to clockevents/clocksource")
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1e42fa04af
commit
4adf2b4bd3
1 changed files with 3 additions and 2 deletions
|
@ -96,11 +96,12 @@ static struct irqaction footbridge_timer_irq = {
|
|||
void __init footbridge_timer_init(void)
|
||||
{
|
||||
struct clock_event_device *ce = &ckevt_dc21285;
|
||||
unsigned rate = DIV_ROUND_CLOSEST(mem_fclk_21285, 16);
|
||||
|
||||
clocksource_register_hz(&cksrc_dc21285, (mem_fclk_21285 + 8) / 16);
|
||||
clocksource_register_hz(&cksrc_dc21285, rate);
|
||||
|
||||
setup_irq(ce->irq, &footbridge_timer_irq);
|
||||
|
||||
ce->cpumask = cpumask_of(smp_processor_id());
|
||||
clockevents_config_and_register(ce, mem_fclk_21285, 0x4, 0xffffff);
|
||||
clockevents_config_and_register(ce, rate, 0x4, 0xffffff);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue