summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorRaviteja Narayanam <raviteja.narayanam@xilinx.com>2020-04-09 11:56:03 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-16 16:15:14 +0200
commita8e7346b7c0a3b33963e5e043e2c612fdf69de34 (patch)
tree7162c2eab050341ae898576e323350a55e367678 /drivers/tty
parent42e11948ddf68b9f799cad8c0ddeab0a39da33e8 (diff)
downloadlinux-a8e7346b7c0a3b33963e5e043e2c612fdf69de34.tar.gz
linux-a8e7346b7c0a3b33963e5e043e2c612fdf69de34.tar.bz2
linux-a8e7346b7c0a3b33963e5e043e2c612fdf69de34.zip
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')
-rw-r--r--drivers/tty/serial/xilinx_uartps.c4
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 */