projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Schedule removal of non-CONFIG_NET_MULTI net driver API
[oweals/u-boot.git]
/
lib_microblaze
/
time.c
diff --git
a/lib_microblaze/time.c
b/lib_microblaze/time.c
index 12e84888bd5f3daa0285be53a34e430208d76194..cbb43414f9cf860b0ad83bb899012e2bbb58d454 100644
(file)
--- 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.
*
* (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
* Yasushi SHOJI <yashi@atmark-techno.com>
*
* See file CREDITS for list of people who contributed to this
@@
-22,6
+24,19
@@
* MA 02111-1307 USA
*/
* MA 02111-1307 USA
*/
-void udelay(unsigned long usec)
+#include <common.h>
+
+#ifdef CONFIG_SYS_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