2 * arch/arm/include/debug/8250.S
4 * Copyright (C) 1994-2013 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 #include <linux/serial_reg.h>
12 .macro addruart, rp, rv, tmp
13 ldr \rp, =CONFIG_DEBUG_UART_PHYS
14 ldr \rv, =CONFIG_DEBUG_UART_VIRT
17 #ifdef CONFIG_DEBUG_UART_8250_WORD
18 .macro store, rd, rx:vararg
24 .macro load, rd, rx:vararg
29 .macro store, rd, rx:vararg
33 .macro load, rd, rx:vararg
38 #define UART_SHIFT CONFIG_DEBUG_UART_8250_SHIFT
41 store \rd, [\rx, #UART_TX << UART_SHIFT]
45 1002: load \rd, [\rx, #UART_LSR << UART_SHIFT]
46 and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
47 teq \rd, #UART_LSR_TEMT | UART_LSR_THRE
52 #ifdef CONFIG_DEBUG_UART_8250_FLOW_CONTROL
53 1001: load \rd, [\rx, #UART_MSR << UART_SHIFT]
54 tst \rd, #UART_MSR_CTS