9
0
Fork 0

edb93xx: Avoid stack usage in early_udelay()

edb93xx: The purpose of early_udelay() is to provide delay functionality in the
early board setup, when the stack isn't set up yet. With some compiler versions
the current implementation makes use of the stack and ends up crashing. Fix this
by removing an explicit division from early_udelay()

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Matthias Kaehlcke 2010-02-07 00:55:22 +01:00 committed by Sascha Hauer
parent 796bb21f59
commit 63c194ad57
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@
static inline void early_udelay(uint32_t usecs)
{
/* loop takes 4 cycles at 5.0ns (fastest case, running at 200MHz) */
register uint32_t loops = (usecs * 1000) / 20;
register uint32_t loops = usecs * (1000 / 20);
__asm__ volatile ("1:\n"
"subs %0, %1, #1\n"