summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorAlessandro Rubini <rubini-list@gnudd.com>2010-02-06 20:53:54 +0100
committerTom Rix <Tom.Rix@windriver.com>2010-02-12 12:31:54 -0600
commit822bd70db49773b4d57eaa484dca83386a6b3479 (patch)
tree7b22e277341c22043bb2749cd77f86556d0736ec /board
parentc50a0f503967d435150bbb9f2f816ce33afdf231 (diff)
downloadu-boot-imx-822bd70db49773b4d57eaa484dca83386a6b3479.zip
u-boot-imx-822bd70db49773b4d57eaa484dca83386a6b3479.tar.gz
u-boot-imx-822bd70db49773b4d57eaa484dca83386a6b3479.tar.bz2
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>
Diffstat (limited to 'board')
-rw-r--r--board/edb93xx/early_udelay.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/edb93xx/early_udelay.h b/board/edb93xx/early_udelay.h
index 3b26b3f..185283d 100644
--- a/board/edb93xx/early_udelay.h
+++ b/board/edb93xx/early_udelay.h
@@ -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"