summaryrefslogtreecommitdiff
path: root/lib_microblaze/time.c
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2007-03-11 13:48:24 +0100
committerMichal Simek <monstr@monstr.eu>2007-03-11 13:48:24 +0100
commitcfc67116a706fd18b8f6a9c11a16753c5626d689 (patch)
treea8ece1d13504912339bd59cbbc5d29c74c1def4d /lib_microblaze/time.c
parent76316a318de91f6184e7c22a10e02d275ade2441 (diff)
[Microblaze][PATCH] part 2
timer support interrupt controller support flash support ethernet support cache support board information support env support booting image support adding support for Xilinx ML401
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 12e84888b..3fa1b1126 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)) ;
}