|
@@ -7,6 +7,8 @@
|
|
|
* Delay routines, using a pre-computed "loops_per_jiffy" value.
|
|
|
*/
|
|
|
|
|
|
+#include <linux/kernel.h>
|
|
|
+
|
|
|
extern unsigned long loops_per_jiffy;
|
|
|
|
|
|
#include <asm/delay.h>
|
|
@@ -32,7 +34,11 @@ extern unsigned long loops_per_jiffy;
|
|
|
#endif
|
|
|
|
|
|
#ifndef ndelay
|
|
|
-#define ndelay(x) udelay(((x)+999)/1000)
|
|
|
+static inline void ndelay(unsigned long x)
|
|
|
+{
|
|
|
+ udelay(DIV_ROUND_UP(x, 1000));
|
|
|
+}
|
|
|
+#define ndelay(x) ndelay(x)
|
|
|
#endif
|
|
|
|
|
|
void calibrate_delay(void);
|