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/config.h>
13 #include <linux/linkage.h>
14 #include <asm/hardware.h>
19 * Some debugging routines (useful if you've got MM problems and
20 * printk isn't working). For DEBUGGING ONLY!!! Do not leave
21 * references to these in a production kernel!
24 #if defined(CONFIG_DEBUG_ICEDCC)
25 @@ debug using ARM EmbeddedICE DCC channel
29 .macro senduart, rd, rx
30 mcr p14, 0, \rd, c1, c0, 0
33 .macro busyuart, rd, rx
35 mrc p14, 0, \rx, c0, c0, 0
41 .macro waituart, rd, rx
46 mrc p14, 0, \rx, c0, c0, 0
52 #include <asm/arch/debug-macro.S>
56 * Useful debugging routines
68 printhex: adr r2, hexbuf
76 addge r1, r1, #'a' - 10