patch-2.4.0-test9 linux/arch/arm/kernel/debug-armv.S
Next file: linux/arch/arm/kernel/dec21285.c
Previous file: linux/arch/arm/kernel/debug-armo.S
Back to the patch index
Back to the overall index
- Lines: 75
- Date:
Mon Sep 18 15:15:24 2000
- Orig file:
v2.4.0-test8/linux/arch/arm/kernel/debug-armv.S
- Orig date:
Sun Aug 13 09:54:15 2000
diff -u --recursive --new-file v2.4.0-test8/linux/arch/arm/kernel/debug-armv.S linux/arch/arm/kernel/debug-armv.S
@@ -1,14 +1,18 @@
/*
- * linux/arch/arm/kernel/debug-armv.S
+ * linux/arch/arm/kernel/debug-armv.S
*
- * Copyright (C) 1994-1999 Russell King
+ * Copyright (C) 1994-1999 Russell King
*
- * 32-bit debugging code
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 32-bit debugging code
*/
#include <linux/config.h>
#include <linux/linkage.h>
#include <asm/hardware.h>
-#include <asm/dec21285.h>
+#include <asm/hardware/dec21285.h>
.text
@@ -29,10 +33,10 @@
.endm
.macro busyuart,rd,rx
-1002: ldrb \rd, [\rx, #0x14]
+1001: ldrb \rd, [\rx, #0x14]
and \rd, \rd, #0x60
teq \rd, #0x60
- bne 1002b
+ bne 1001b
.endm
.macro waituart,rd,rx
@@ -189,6 +193,38 @@
tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy
bne 1001b
.endm
+
+#elif defined(CONFIG_ARCH_INTEGRATOR)
+
+#include <asm/hardware/serial_amba.h>
+
+ .equ io_virt, 0xf0000000 + (0x16000000 >> 4)
+ .equ io_phys, 0x16000000
+
+ .macro addruart,rx
+ mrc p15, 0, \rx, c1, c0
+ tst \rx, #1 @ MMU enabled?
+ moveq \rx, #0x16000000 @ physical base address
+ movne \rx, #0xf0000000 @ virtual base
+ addne \rx, \rx, #0x16000000 >> 4
+ .endm
+
+ .macro senduart,rd,rx
+ strb \rd, [\rx, #AMBA_UARTDR]
+ .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)