summaryrefslogtreecommitdiff
path: root/lib_microblaze/time.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2007-04-04 02:05:48 +0200
committerWolfgang Denk <wd@denx.de>2007-04-04 02:05:48 +0200
commitc8f228016202aff5ff09cdeeabe8cffd8d898510 (patch)
tree583d863ceacb0c9de2051e5057a7dc0fc849252a /lib_microblaze/time.c
parent94abd7c0583ebe01e799b25f451201deeaab550d (diff)
parent342cd097be1e7affe82f42ab3da220959a699e64 (diff)
downloadu-boot-imx-c8f228016202aff5ff09cdeeabe8cffd8d898510.zip
u-boot-imx-c8f228016202aff5ff09cdeeabe8cffd8d898510.tar.gz
u-boot-imx-c8f228016202aff5ff09cdeeabe8cffd8d898510.tar.bz2
Merge with /home/wd/git/u-boot/custodian/u-boot-microblaze
Diffstat (limited to 'lib_microblaze/time.c')
-rw-r--r--lib_microblaze/time.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib_microblaze/time.c b/lib_microblaze/time.c
index 12e8488..3fa1b11 100644
--- a/lib_microblaze/time.c
+++ b/lib_microblaze/time.c
@@ -1,6 +1,8 @@
/*
+ * (C) Copyright 2007 Michal Simek
* (C) Copyright 2004 Atmark Techno, Inc.
*
+ * Michal SIMEK <monstr@monstr.eu>
* Yasushi SHOJI <yashi@atmark-techno.com>
*
* See file CREDITS for list of people who contributed to this
@@ -22,6 +24,11 @@
* MA 02111-1307 USA
*/
-void udelay(unsigned long usec)
+#include <common.h>
+
+void udelay (unsigned long usec)
{
+ int i;
+ i = get_timer (0);
+ while ((get_timer (0) - i) < (usec / 1000)) ;
}