fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / arm / kernel / debug.S
index caaa919..5617566 100644 (file)
@@ -9,9 +9,7 @@
  *
  *  32-bit debugging code
  */
-#include <linux/config.h>
 #include <linux/linkage.h>
-#include <asm/hardware.h>
 
                .text
 
 
 #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