edb93xx: change calculation un early_udelay.h

Previous code compiled with gcc-4.2.2 makes a call to
__aeabi_uidiv to divide by 20. As a side effect it was
not inline any more, and so sdram_cfg used the stack
as well, but this is early code that has no stack yet.
The patch explicitly removes the division, so no stack is used.

The calculation of the counter calls a division by 20

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
This commit is contained in:
Alessandro Rubini 2010-02-06 20:53:54 +01:00 committed by Tom Rix
parent c50a0f5039
commit 822bd70db4
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"