diff options
author | Raviteja Narayanam <raviteja.narayanam@xilinx.com> | 2020-04-09 09:26:03 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-16 17:15:14 +0300 |
commit | a8e7346b7c0a3b33963e5e043e2c612fdf69de34 (patch) | |
tree | 7162c2eab050341ae898576e323350a55e367678 /drivers/tty/serial/xilinx_uartps.c | |
parent | 42e11948ddf68b9f799cad8c0ddeab0a39da33e8 (diff) | |
download | linux-a8e7346b7c0a3b33963e5e043e2c612fdf69de34.tar.xz |
serial: uartps: Use cdns_uart_tx_empty in console_write
Instead of accessing the registers and checking for tx_empty,
use cdns_uart_tx_empty in cdns_uart_console_write function.
Signed-off-by: Raviteja Narayanam <raviteja.narayanam@xilinx.com>
Reviewed-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://lore.kernel.org/r/1586413563-29125-3-git-send-email-raviteja.narayanam@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/xilinx_uartps.c')
-rw-r--r-- | drivers/tty/serial/xilinx_uartps.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 0bf946b0b198..042aa6f1c9c4 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1233,9 +1233,7 @@ static void cdns_uart_console_write(struct console *co, const char *s, writel(ctrl, port->membase + CDNS_UART_CR); uart_console_write(port, s, count, cdns_uart_console_putchar); - while ((readl(port->membase + CDNS_UART_SR) & - (CDNS_UART_SR_TXEMPTY | CDNS_UART_SR_TACTIVE)) != - CDNS_UART_SR_TXEMPTY) + while (cdns_uart_tx_empty(port) != TIOCSER_TEMT) cpu_relax(); /* restore interrupt state */ |