2 /* Copyright 2000 AG Electronics Ltd. */
3 /* This code is distributed without warranty under the GPL v2 (see COPYING) */
10 return bsp_clock_speed();
13 unsigned ticks_since_boot(void)
15 extern unsigned long long _timebase(void);
16 return (unsigned) (_timebase());
19 void sleep_ticks(unsigned ticks)
21 unsigned then = ticks + ticks_since_boot();
22 while(ticks_since_boot() < then)
26 void udelay(int usecs)
28 unsigned ticksperusec = get_hz() / 1000000;
30 sleep_ticks(ticksperusec * usecs);