]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 3838/1: ARM: DCC debug console support for ARM11
authorTony Lindgren <tony@atomide.com>
Wed, 20 Sep 2006 12:03:34 +0000 (13:03 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 25 Sep 2006 09:36:09 +0000 (10:36 +0100)
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>
arch/arm/boot/compressed/head.S
arch/arm/boot/compressed/misc.c
arch/arm/kernel/debug.S

index 987c44160496fb72d0b90aa6d3d0c0d858989a87..75df1f764a10eff4af12c5e5e55240d42f6da941 100644 (file)
 #ifdef DEBUG
 
 #if defined(CONFIG_DEBUG_ICEDCC)
+
+#ifdef CONFIG_CPU_V6
+               .macro  loadsp, rb
+               .endm
+               .macro  writeb, ch, rb
+               mcr     p14, 0, \ch, c0, c5, 0
+               .endm
+#else
                .macro  loadsp, rb
                .endm
                .macro  writeb, ch, rb
                mcr     p14, 0, \ch, c0, c1, 0
                .endm
+#endif
+
 #else
 
 #include <asm/arch/debug-macro.S>
index ace3fb5835d9278833a0c539b8fff0b74e8af885..283891c736c4a9a92ab9f336f93b23ba83dfe956 100644 (file)
@@ -30,6 +30,25 @@ static void putstr(const char *ptr);
 #include <asm/arch/uncompress.h>
 
 #ifdef CONFIG_DEBUG_ICEDCC
+
+#ifdef CONFIG_CPU_V6
+
+static void icedcc_putc(int ch)
+{
+       int status, i = 0x4000000;
+
+       do {
+               if (--i < 0)
+                       return;
+
+               asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status));
+       } while (status & (1 << 29));
+
+       asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
+}
+
+#else
+
 static void icedcc_putc(int ch)
 {
        int status, i = 0x4000000;
@@ -44,6 +63,8 @@ static void icedcc_putc(int ch)
        asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch));
 }
 
+#endif
+
 #define putc(ch)       icedcc_putc(ch)
 #define flush()        do { } while (0)
 #endif
index a5747e58a9dc66d37e0b7182b7f06be2795257a0..5617566477b493d5cc6034a8518b8f6e696195f3 100644 (file)
 
 #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
 
                bne     1001b
 1002:
                .endm
+
+#endif /* CONFIG_CPU_V6 */
+
 #else
 #include <asm/arch/debug-macro.S>
-#endif
+#endif /* CONFIG_DEBUG_ICEDCC */
 
 /*
  * Useful debugging routines