1 /* arch/arm/include/debug/pl01x.S
3 * Debugging macro include header
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
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.
13 #include <linux/amba/serial.h>
15 #ifdef CONFIG_DEBUG_ZTE_ZX
18 #define UART01x_DR 0x04
19 #define UART01x_FR 0x14
22 #ifdef CONFIG_DEBUG_UART_PHYS
23 .macro addruart, rp, rv, tmp
24 ldr \rp, =CONFIG_DEBUG_UART_PHYS
25 ldr \rv, =CONFIG_DEBUG_UART_VIRT
30 strb \rd, [\rx, #UART01x_DR]
34 1001: ldr \rd, [\rx, #UART01x_FR]
35 ARM_BE8( rev \rd, \rd )
36 tst \rd, #UART01x_FR_TXFF
41 1001: ldr \rd, [\rx, #UART01x_FR]
42 ARM_BE8( rev \rd, \rd )
43 tst \rd, #UART01x_FR_BUSY