Polling timer
@ -33,10 +33,17 @@ void reset_timer (void)
timestamp = 0;
}
#ifdef CFG_TIMER_0
ulong get_timer (ulong base)
{
return (timestamp - base);
#else
return (timestamp++ - base);
#endif
void set_timer (ulong t)
@ -26,9 +26,17 @@
#include <common.h>
void udelay (unsigned long usec)
int i;
i = get_timer (0);
while ((get_timer (0) - i) < (usec / 1000)) ;
unsigned int i;
for (i = 0; i < (usec * CONFIG_XILINX_CLOCK_FREQ / 10000000); i++);