patch-2.4.20 linux-2.4.20/include/asm-mips/delay.h

Next file: linux-2.4.20/include/asm-mips/dma.h
Previous file: linux-2.4.20/include/asm-mips/dec/tcmodule.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/include/asm-mips/delay.h linux-2.4.20/include/asm-mips/delay.h
@@ -10,6 +10,7 @@
 #define _ASM_DELAY_H
 
 #include <linux/config.h>
+#include <linux/param.h>
 
 extern unsigned long loops_per_jiffy;
 
@@ -39,7 +40,11 @@
 {
 	unsigned long lo;
 
+#if (HZ == 100)
 	usecs *= 0x00068db8;		/* 2**32 / (1000000 / HZ) */
+#elif (HZ == 128)
+	usecs *= 0x0008637b;		/* 2**32 / (1000000 / HZ) */
+#endif
 	__asm__("multu\t%2,%3"
 		:"=h" (usecs), "=l" (lo)
 		:"r" (usecs),"r" (lpj));

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)