patch-2.3.16 linux/arch/sh/lib/delay.c

Next file: linux/arch/sh/lib/memcpy.S
Previous file: linux/arch/sh/lib/csum_partial_copy.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.15/linux/arch/sh/lib/delay.c linux/arch/sh/lib/delay.c
@@ -0,0 +1,21 @@
+/*
+ *	Precise Delay Loops for SuperH
+ *
+ *	Copyright (C) 1999 Niibe Yutaka
+ */
+
+#include <linux/sched.h>
+#include <linux/delay.h>
+
+inline void __const_udelay(unsigned long xloops)
+{
+	xloops *= current_cpu_data.loops_per_sec;
+        __delay(xloops);
+}
+
+#if 0
+void __udelay(unsigned long usecs)
+{
+	__const_udelay(usecs * 0x000010c6);  /* 2**32 / 1000000 */
+}
+#endif

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