2 * linux/arch/arm/kernel/debug.S
4 * Copyright (C) 1994-1999 Russell King
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * 32-bit debugging code
12 #include <linux/linkage.h>
17 * Some debugging routines (useful if you've got MM problems and
18 * printk isn't working). For DEBUGGING ONLY!!! Do not leave
19 * references to these in a production kernel!
22 #if defined(CONFIG_DEBUG_ICEDCC)
23 @@ debug using ARM EmbeddedICE DCC channel
25 #if defined(CONFIG_CPU_V6)
30 .macro senduart, rd, rx
31 mcr p14, 0, \rd, c0, c5, 0
34 .macro busyuart, rd, rx
36 mrc p14, 0, \rx, c0, c1, 0
41 .macro waituart, rd, rx
46 mrc p14, 0, \rx, c0, c1, 0
57 .macro senduart, rd, rx
58 mcr p14, 0, \rd, c1, c0, 0
61 .macro busyuart, rd, rx
63 mrc p14, 0, \rx, c0, c0, 0
69 .macro waituart, rd, rx
74 mrc p14, 0, \rx, c0, c0, 0
80 #endif /* CONFIG_CPU_V6 */
83 #include <asm/arch/debug-macro.S>
84 #endif /* CONFIG_DEBUG_ICEDCC */
87 * Useful debugging routines
99 printhex: adr r2, hexbuf
107 addge r1, r1, #'a' - 10
116 /* XXX joshua 20031110: this *should* be abstracted more. jtag should
117 * probably be made into its own set of waituart senduart busyuart stuff.
120 #ifndef CONFIG_LL_PXA_JTAG
136 #warning ------------------------------------------------
138 #warning ------------------------------------------------
139 #warning JTAG low-level debug is enabled!
140 #warning Bad stuff will happen if you don't know what
141 #warning you're doing!
143 #warning Don't say I didn't warn you when stuff breaks!
144 #warning ------------------------------------------------
147 1: mrc p14, 0, r15, c14, c0, 0
149 mcr p14, 0, r1, c8, c0, 0