2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
* Copyright 2003 PathScale, Inc.
|
|
|
|
* Copied from arch/x86_64
|
|
|
|
*
|
|
|
|
* Licensed under the GPL
|
|
|
|
*/
|
|
|
|
|
2005-05-06 07:15:37 +08:00
|
|
|
#include "linux/delay.h"
|
2005-04-17 06:20:36 +08:00
|
|
|
#include "asm/processor.h"
|
2005-05-06 07:15:37 +08:00
|
|
|
#include "asm/param.h"
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
void __delay(unsigned long loops)
|
|
|
|
{
|
|
|
|
unsigned long i;
|
|
|
|
|
|
|
|
for(i = 0; i < loops; i++) ;
|
|
|
|
}
|
|
|
|
|
2005-05-06 07:15:37 +08:00
|
|
|
void __udelay(unsigned long usecs)
|
|
|
|
{
|
|
|
|
int i, n;
|
|
|
|
|
|
|
|
n = (loops_per_jiffy * HZ * usecs) / MILLION;
|
|
|
|
for(i=0;i<n;i++) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
void __const_udelay(unsigned long usecs)
|
|
|
|
{
|
|
|
|
int i, n;
|
|
|
|
|
|
|
|
n = (loops_per_jiffy * HZ * usecs) / MILLION;
|
|
|
|
for(i=0;i<n;i++) ;
|
|
|
|
}
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
* Overrides for Emacs so that we follow Linus's tabbing style.
|
|
|
|
* Emacs will notice this stuff at the end of the file and automatically
|
|
|
|
* adjust the settings for this buffer only. This must remain at the end
|
|
|
|
* of the file.
|
|
|
|
* ---------------------------------------------------------------------------
|
|
|
|
* Local variables:
|
|
|
|
* c-file-style: "linux"
|
|
|
|
* End:
|
|
|
|
*/
|