summaryrefslogtreecommitdiff
path: root/arch/arm/kernel/debug.S
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2006-09-20 13:03:34 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-25 10:36:09 +0100
commit7d95ded91149564100a3181d341361aedcfd5bf5 (patch)
tree5be7882a7cc3f3c646f12c2c60cb7a689d46d0ba /arch/arm/kernel/debug.S
parentbaf97ce6eda5891ee45fae9c1b06db855bb697e1 (diff)
[ARM] 3838/1: ARM: DCC debug console support for ARM11
Adds support for CONFIG_DEBUG_ICEDCC for ARM11. Tested on ARM1136 (OMAP2420). Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/debug.S')
-rw-r--r--arch/arm/kernel/debug.S35
1 files changed, 34 insertions, 1 deletions
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S
index a5747e58a9dc..5617566477b4 100644
--- a/arch/arm/kernel/debug.S
+++ b/arch/arm/kernel/debug.S
@@ -21,6 +21,36 @@
#if defined(CONFIG_DEBUG_ICEDCC)
@@ debug using ARM EmbeddedICE DCC channel
+
+#if defined(CONFIG_CPU_V6)
+
+ .macro addruart, rx
+ .endm
+
+ .macro senduart, rd, rx
+ mcr p14, 0, \rd, c0, c5, 0
+ .endm
+
+ .macro busyuart, rd, rx
+1001:
+ mrc p14, 0, \rx, c0, c1, 0
+ tst \rx, #0x20000000
+ beq 1001b
+ .endm
+
+ .macro waituart, rd, rx
+ mov \rd, #0x2000000
+1001:
+ subs \rd, \rd, #1
+ bmi 1002f
+ mrc p14, 0, \rx, c0, c1, 0
+ tst \rx, #0x20000000
+ bne 1001b
+1002:
+ .endm
+
+#else
+
.macro addruart, rx
.endm
@@ -46,9 +76,12 @@
bne 1001b
1002:
.endm
+
+#endif /* CONFIG_CPU_V6 */
+
#else
#include <asm/arch/debug-macro.S>
-#endif
+#endif /* CONFIG_DEBUG_ICEDCC */
/*
* Useful debugging routines