diff options
author | Keith M Wesolowski <wesolows@foobazco.org> | 2001-02-26 01:08:20 +0000 |
---|---|---|
committer | Keith M Wesolowski <wesolows@foobazco.org> | 2001-02-26 01:08:20 +0000 |
commit | e3eb7ee2ae9c639081e5c3209930582d7a1717c0 (patch) | |
tree | c600e6c30870799556d14cc6cc22f760ecc093f7 /include/asm-mips | |
parent | 7ba1171cc6ddcdf138522e5c63b15ff3dbe9edf6 (diff) |
Update to using loops_per_jiffy instead of loops_per_sec.
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/delay.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-mips/delay.h b/include/asm-mips/delay.h index 840e868a1..50024e348 100644 --- a/include/asm-mips/delay.h +++ b/include/asm-mips/delay.h @@ -11,7 +11,7 @@ #include <linux/config.h> -extern unsigned long loops_per_sec; +extern unsigned long loops_per_jiffy; extern __inline__ void __delay(unsigned long loops) @@ -35,21 +35,21 @@ __delay(unsigned long loops) * first constant multiplications gets optimized away if the delay is * a constant) */ -extern __inline__ void __udelay(unsigned long usecs, unsigned long lps) +extern __inline__ void __udelay(unsigned long usecs, unsigned long lpj) { unsigned long lo; - usecs *= 0x000010c6; /* 2**32 / 1000000 */ + usecs *= 0x00068db8; /* 2**32 / (1000000 / HZ) */ __asm__("multu\t%2,%3" :"=h" (usecs), "=l" (lo) - :"r" (usecs),"r" (lps)); + :"r" (usecs),"r" (lpj)); __delay(usecs); } #ifdef CONFIG_SMP #define __udelay_val cpu_data[smp_processor_id()].udelay_val #else -#define __udelay_val loops_per_sec +#define __udelay_val loops_per_jiffy #endif #define udelay(usecs) __udelay((usecs),__udelay_val) |