patch-2.3.99-pre8 linux/arch/arm/kernel/debug-armv.S

Next file: linux/arch/arm/kernel/entry-armv.S
Previous file: linux/arch/arm/kernel/calls.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre7/linux/arch/arm/kernel/debug-armv.S linux/arch/arm/kernel/debug-armv.S
@@ -160,6 +160,33 @@
 		bne	1001b
 		.endm
 
+#elif defined(CONFIG_ARCH_L7200)
+
+		.macro	addruart,rx
+
+		mrc	p15, 0, \rx, c1, c0
+		tst	\rx, #1			@ MMU enabled?
+		moveq	\rx, #0x80000000	@ physical base address
+		movne	\rx, #0xd0000000        @ virtual address
+		add	\rx, \rx, #0x00044000	@ Ser1
+@		add	\rx, \rx, #0x00045000	@ Ser2
+		.endm
+
+		.macro	senduart,rd,rx
+		str	\rd, [\rx, #0x0]	@ UARTDR1
+		.endm
+
+		.macro	waituart,rd,rx
+1001:		ldr	\rd, [\rx, #0x18]	@ UARTFLG
+		tst	\rd, #1 << 5		@ UARTFLGUTXFF - 1 when full
+		bne	1001b
+		.endm
+
+		.macro	busyuart,rd,rx
+1001:		ldr	\rd, [\rx, #0x18]	@ UARTFLG
+		tst	\rd, #1 << 3		@ UARTFLGUBUSY - 1 when busy
+		bne	1001b
+		.endm
 #else
 #error Unknown architecture
 #endif

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