]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
OMAP2: gptimer min_delta_ns corrected
authorAaro Koskinen <Aaro.Koskinen@nokia.com>
Fri, 2 Jan 2009 15:07:16 +0000 (17:07 +0200)
committerTony Lindgren <tony@atomide.com>
Fri, 9 Jan 2009 11:57:11 +0000 (13:57 +0200)
commitf2afacf5dfe0e69eb41f38f82a46436c6438b674
tree857a29322a46614b1f00e89d823a90ead9cf6647
parent3456ef483b5322ba4a7647f024e2c5b7846cd7e3
OMAP2: gptimer min_delta_ns corrected

When 32 kHz timer is used the min_delta_ns should be initialized so
that it reflects the timer programming cost. A write to the timer
device will be usually posted, but it takes roughly 3 cycles before
it is effective. If the timer is reprogrammed before that, the CPU
will stall until the previous write completes. This was pointed out by
Richard Woodruff.

Since the lower bound for min_delta_ns is 1000, the change is visible
only with tick rates less than 3 MHz.

Also note that the old value is incorrect for 32 kHz also due to
a rounding error, and it can cause the timer queue to hang (due to
clockevent code trying to program the timer with zero ticks).

Signed-off-by: Aaro Koskinen <Aaro.Koskinen@nokia.com>
Reviewed-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/timer-gp.c