2 * Broadcom BCM63xx low-level UART debug
4 * Copyright (C) 2014 Broadcom Corporation
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.
11 #include <linux/serial_bcm63xx.h>
13 .macro addruart, rp, rv, tmp
14 ldr \rp, =CONFIG_DEBUG_UART_PHYS
15 ldr \rv, =CONFIG_DEBUG_UART_VIRT
18 .macro senduart, rd, rx
19 /* word access do not work */
20 strb \rd, [\rx, #UART_FIFO_REG]
23 .macro waituart, rd, rx
24 1001: ldr \rd, [\rx, #UART_IR_REG]
25 tst \rd, #(1 << UART_IR_TXEMPTY)
29 .macro busyuart, rd, rx
30 1002: ldr \rd, [\rx, #UART_IR_REG]
31 tst \rd, #(1 << UART_IR_TXTRESH)