patch-2.4.22 linux-2.4.22/include/asm-cris/delay.h
Next file: linux-2.4.22/include/asm-cris/dma.h
Previous file: linux-2.4.22/include/asm-cris/byteorder.h
Back to the patch index
Back to the overall index
-  Lines: 14
-  Date:
2003-08-25 04:44:43.000000000 -0700
-  Orig file: 
linux-2.4.21/include/asm-cris/delay.h
-  Orig date: 
2001-10-08 11:43:54.000000000 -0700
diff -urN linux-2.4.21/include/asm-cris/delay.h linux-2.4.22/include/asm-cris/delay.h
@@ -39,6 +39,13 @@
 	__delay(usecs * loops_per_usec);
 }
 
+/* ETRAX 100 is really too slow to sleep for nanosecs. */
+/* Divide with 1024 to avoid a real division that would take >1 us... */
+extern __inline__ void ndelay(unsigned long nsecs)
+{
+	__delay(1 + nsecs * loops_per_usec / 1024);
+}
+
 #endif /* defined(_CRIS_DELAY_H) */
 
 
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)