diff options
author | Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | 2007-11-29 00:56:37 +0900 |
---|---|---|
committer | Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | 2007-11-29 00:56:37 +0900 |
commit | 7fc792895be3c0edf423c4038992b40345672a12 (patch) | |
tree | 6247dce2d1e72aa17fd2d7a138af66158d02f319 /lib_microblaze/time.c | |
parent | eda3e1e6619ad0bee94ae4b16c99d88e77e2af13 (diff) | |
parent | f92edbd8a0ef16a2b9127cbb564c09685728e4b0 (diff) | |
download | u-boot-imx-7fc792895be3c0edf423c4038992b40345672a12.zip u-boot-imx-7fc792895be3c0edf423c4038992b40345672a12.tar.gz u-boot-imx-7fc792895be3c0edf423c4038992b40345672a12.tar.bz2 |
Merge git://www.denx.de/git/u-boot
Conflicts:
drivers/Makefile
Diffstat (limited to 'lib_microblaze/time.c')
-rw-r--r-- | lib_microblaze/time.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib_microblaze/time.c b/lib_microblaze/time.c index 3fa1b11..b5d8f19 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 |