Explorar o código

[ARM] pxa: fix PXA27x resume

When PXA27x wakes up, tick_resume_oneshot() tries to set a timer
interrupt to occur immediately.  Since PXA27x requires at least
MIN_OSCR_DELTA, this causes us to flag an error.

tick_program_event() then increments the next event time by
min_delta_ns.  However, by the time we get back to programming
the next event, the OSCR has incremented such that we fail again.
We repeatedly retry, but the OSCR is too fast for us - we never
catch up, so we never break out of the loop - resulting in us
never apparantly resuming.

Fix this by doubling min_delta_ns.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King %!s(int64=17) %!d(string=hai) anos
pai
achega
dd01b2fc79
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/arm/mach-pxa/time.c

+ 1 - 1
arch/arm/mach-pxa/time.c

@@ -169,7 +169,7 @@ static void __init pxa_timer_init(void)
 	ckevt_pxa_osmr0.max_delta_ns =
 		clockevent_delta2ns(0x7fffffff, &ckevt_pxa_osmr0);
 	ckevt_pxa_osmr0.min_delta_ns =
-		clockevent_delta2ns(MIN_OSCR_DELTA, &ckevt_pxa_osmr0) + 1;
+		clockevent_delta2ns(MIN_OSCR_DELTA * 2, &ckevt_pxa_osmr0) + 1;
 
 	cksrc_pxa_oscr0.mult =
 		clocksource_hz2mult(clock_tick_rate, cksrc_pxa_oscr0.shift);