ARM: udelay: prevent math rounding resulting in short udelays
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 10 Jan 2011 23:55:59 +0000 (23:55 +0000)
committerMatt Sealey <matt@genesi-usa.com>
Sat, 29 Jan 2011 15:21:06 +0000 (09:21 -0600)
commit48347800be82e22c089ceb317188908b19f8b174
tree0240887aede537ca86cf4efc344a3b3c2daeb423
parent189a808937aae68657ac40767e311a54e575b46e
ARM: udelay: prevent math rounding resulting in short udelays

We perform the microseconds to loops calculation using a number of
multiplies and shift rights.  Each shift right rounds down the
resulting value, which can result in delays shorter than requested.
Ensure that we always round up.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/lib/delay.S