patch-2.4.21 linux-2.4.21/include/asm-m68k/delay.h
Next file: linux-2.4.21/include/asm-m68k/dvma.h
Previous file: linux-2.4.21/include/asm-m68k/apollohw.h
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
2003-06-13 07:51:38.000000000 -0700
- Orig file:
linux-2.4.20/include/asm-m68k/delay.h
- Orig date:
2001-01-04 13:00:55.000000000 -0800
diff -urN linux-2.4.20/include/asm-m68k/delay.h linux-2.4.21/include/asm-m68k/delay.h
@@ -16,6 +16,7 @@
}
extern void __bad_udelay(void);
+extern void __bad_ndelay(void);
/*
* Use only for very small delays ( < 1 msec). Should probably use a
@@ -39,10 +40,19 @@
__const_udelay(usecs * 4295); /* 2**32 / 1000000 */
}
+static inline void __ndelay(unsigned long nsecs)
+{
+ __const_udelay(nsecs * 5); /* 2**32 / 1000000000 */
+}
+
#define udelay(n) (__builtin_constant_p(n) ? \
((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 4295)) : \
__udelay(n))
+#define ndelay(n) (__builtin_constant_p(n) ? \
+ ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5)) : \
+ __ndelay(n))
+
extern __inline__ unsigned long muldiv(unsigned long a, unsigned long b, unsigned long c)
{
unsigned long tmp;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)