micro_delay in sysutil, used in ti1225, dp8390, fxp and

orinoco now. Uses a combination of tickdelay (where possible) and
calibrated busywait (where necessary).
This commit is contained in:
Ben Gras
2007-07-31 15:01:49 +00:00
parent 2dc2db4ba1
commit 03446f5554
8 changed files with 105 additions and 49 deletions

View File

@@ -46,24 +46,6 @@ int this_proc;
#define MICROS_TO_TICKS(m) (((m)*HZ/1000000)+1)
/*****************************************************************************
* milli_delay *
* *
* Wait usecs micro seconds. Clearly needs revision *
*****************************************************************************/
static void micro_delay(unsigned long usecs)
{
int i, j;
if(usecs >= 100) {
/* If the delay is long, we might as well use ticks */
tickdelay(MICROS_TO_TICKS(usecs));
} else {
/* use another type of hack :-), or a proper implementation */
for(i=0; i < 1000 * usecs; i++){j+=1;}
}
}
/*****************************************************************************
* milli_delay *
* *