patch-2.1.80 linux/arch/arm/lib/delay.S
Next file: linux/arch/arm/lib/extractinfo.perl
Previous file: linux/arch/arm/lib/checksum.S
Back to the patch index
Back to the overall index
-  Lines: 44
-  Date:
Tue Jan 20 16:39:41 1998
-  Orig file: 
v2.1.79/linux/arch/arm/lib/delay.S
-  Orig date: 
Wed Dec 31 16:00:00 1969
diff -u --recursive --new-file v2.1.79/linux/arch/arm/lib/delay.S linux/arch/arm/lib/delay.S
@@ -0,0 +1,43 @@
+/*
+ * linux/arch/arm/lib/delay.S
+ *
+ * Copyright (C) 1995, 1996 Russell King
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+		.text
+
+LC0:		.word	SYMBOL_NAME(loops_per_sec)
+
+ENTRY(udelay)
+		mov	r2, #0x1000
+		orr	r2, r2, #0x00c6
+		mul	r1, r0, r2
+		ldr	r2, LC0
+		ldr	r2, [r2]
+		mov	r1, r1, lsr #11
+		mov	r2, r2, lsr #11
+		mul	r0, r1, r2
+		movs	r0, r0, lsr #10
+		RETINSTR(moveq,pc,lr)
+
+@ Delay routine
+ENTRY(__delay)
+		subs	r0, r0, #1
+		RETINSTR(movcc,pc,lr)
+		subs	r0, r0, #1
+		RETINSTR(movcc,pc,lr)
+		subs	r0, r0, #1
+		RETINSTR(movcc,pc,lr)
+		subs	r0, r0, #1
+		RETINSTR(movcc,pc,lr)
+		subs	r0, r0, #1
+		RETINSTR(movcc,pc,lr)
+		subs	r0, r0, #1
+		RETINSTR(movcc,pc,lr)
+		subs	r0, r0, #1
+		RETINSTR(movcc,pc,lr)
+		subs	r0, r0, #1
+		bcs	SYMBOL_NAME(__delay)
+		RETINSTR(mov,pc,lr)
+
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov