aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/hardware
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-03-16 15:50:34 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-03-21 17:05:58 -0500
commit71dccd0f158a8077c92d51f213b55991b7a0e47e (patch)
treee5a3f3284db0669b63ea8ad6a263f226aca48dd1 /include/asm-arm/hardware
parent268099e3ccca5a988632ce18abd21d809d632ddc (diff)
[ARM] Collect Primecell PL01x-based debug implementations together
Several ARM machine implementations used a PL01x primecell compatible serial port for debugging purposes, and indepdently implemented the low level debug macros every time. Provide a common implementation and convert these implementations to use this version. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/hardware')
-rw-r--r--include/asm-arm/hardware/debug-pl01x.S29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/asm-arm/hardware/debug-pl01x.S b/include/asm-arm/hardware/debug-pl01x.S
new file mode 100644
index 000000000000..db0d0f7de5e9
--- /dev/null
+++ b/include/asm-arm/hardware/debug-pl01x.S
@@ -0,0 +1,29 @@
1/* linux/include/asm-arm/arch-integrator/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13#include <linux/amba/serial.h>
14
15 .macro senduart,rd,rx
16 strb \rd, [\rx, #UART01x_DR]
17 .endm
18
19 .macro waituart,rd,rx
201001: ldr \rd, [\rx, #UART01x_FR]
21 tst \rd, #UART01x_FR_TXFF
22 bne 1001b
23 .endm
24
25 .macro busyuart,rd,rx
261001: ldr \rd, [\rx, #UART01x_FR]
27 tst \rd, #UART01x_FR_BUSY
28 bne 1001b
29 .endm