summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorMatthias Kaehlcke <matthias@kaehlcke.net>2010-02-07 00:55:22 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2010-02-08 14:42:06 +0100
commit63c194ad57742911f3aea73b42bde0b5f497cc10 (patch)
tree40abad6f152e440f0daa911a630f2288d4f27856 /board
parent796bb21f59b655034ea590d3a53c4cddca479dc9 (diff)
downloadbarebox-63c194ad57742911f3aea73b42bde0b5f497cc10.tar.gz
barebox-63c194ad57742911f3aea73b42bde0b5f497cc10.tar.xz
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>
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 3b26b3f16c..185283d98d 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"