ARM: OMAP: gptimer min_delta_ns corrected Release-2010-05/1
authorAaro Koskinen <Aaro.Koskinen@nokia.com>
Thu, 29 Jan 2009 16:57:17 +0000 (08:57 -0800)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 21 May 2010 23:11:07 +0000 (02:11 +0300)
commit12942775ca2db1c41d190314da65f3a74899b0dc
tree23838fac3ad0e1a90767fbe788aed831092838db
parent4dc135e2be0f2663ed50189bba2129525dc123ed
ARM: OMAP: 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