M68k ndelay()
diff mbox series

Message ID 200304131305.h3DD5EQi001293@callisto.of.borg
State New, archived
Headers show
Series
  • M68k ndelay()
Related show

Commit Message

Geert Uytterhoeven April 13, 2003, 1:05 p.m. UTC
M68k: add ndelay() implementation (needed for IDE)


Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Patch
diff mbox series

--- linux-2.4.21-pre7/include/asm-m68k/delay.h	Thu Jan  4 22:00:55 2001
+++ linux-m68k-2.4.21-pre7/include/asm-m68k/delay.h	Sun Mar 30 22:22:40 2003
@@ -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,9 +40,18 @@ 
 	__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)
 {