summaryrefslogtreecommitdiff
path: root/lib_microblaze/time.c
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2007-10-18 10:02:16 -0500
committerKim Phillips <kim.phillips@freescale.com>2007-10-18 10:02:16 -0500
commitf147dd15e840230a3911c649b2a81c749d32db1c (patch)
tree03023c12770b6c33c4e9f75615c4a3319d497c90 /lib_microblaze/time.c
parent8ffc774993725a0646aa8d1995d968c95aee9e3c (diff)
parenteff786a9b89144478f478c4193fcad5b498feb72 (diff)
Merge git://www.denx.de/git/u-boot
Diffstat (limited to 'lib_microblaze/time.c')
-rw-r--r--lib_microblaze/time.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib_microblaze/time.c b/lib_microblaze/time.c
index 3fa1b11262..b5d8f19379 100644
--- a/lib_microblaze/time.c
+++ b/lib_microblaze/time.c
@@ -26,9 +26,17 @@
#include <common.h>
+#ifdef CFG_TIMER_0
void udelay (unsigned long usec)
{
int i;
i = get_timer (0);
while ((get_timer (0) - i) < (usec / 1000)) ;
}
+#else
+void udelay (unsigned long usec)
+{
+ unsigned int i;
+ for (i = 0; i < (usec * CONFIG_XILINX_CLOCK_FREQ / 10000000); i++);
+}
+#endif