diff options
Diffstat (limited to 'drivers/clocksource/jcore-pit.c')
-rw-r--r-- | drivers/clocksource/jcore-pit.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/clocksource/jcore-pit.c b/drivers/clocksource/jcore-pit.c index 4c512d7d8d52..ed5a12c3da45 100644 --- a/drivers/clocksource/jcore-pit.c +++ b/drivers/clocksource/jcore-pit.c @@ -74,6 +74,8 @@ static int jcore_pit_set(unsigned long delta, struct jcore_pit *pit) { jcore_pit_disable(pit); writel(delta, pit->base + REG_THROT); + while (readl(pit->base + REG_COUNT) > 100) + writel(0, pit->base + REG_PITEN); writel(pit->enable_val, pit->base + REG_PITEN); return 0; } @@ -110,7 +112,7 @@ static int jcore_pit_set_next_event(unsigned long delta, static int jcore_pit_local_init(unsigned cpu) { struct jcore_pit *pit = this_cpu_ptr(jcore_pit_percpu); - unsigned buspd, freq, min_delta; + unsigned buspd, freq; pr_info("Local J-Core PIT init on cpu %u\n", pit->cpu); @@ -118,16 +120,7 @@ static int jcore_pit_local_init(unsigned cpu) freq = DIV_ROUND_CLOSEST(NSEC_PER_SEC, buspd); pit->periodic_delta = DIV_ROUND_CLOSEST(NSEC_PER_SEC, HZ * buspd); - /* - * This is a workaround. When the timer system schedules oneshot - * events so soon that the interrupt occurs before the softirq - * part of the timer handler runs, a feedback loop ensues and - * results in long stalls that are broken up only by other - * interrupt activity. - */ - min_delta = DIV_ROUND_CLOSEST(5000000, buspd); - - clockevents_config_and_register(&pit->ced, freq, min_delta, ULONG_MAX); + clockevents_config_and_register(&pit->ced, freq, 1, ULONG_MAX); return 0; } |