[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1586413563-29125-3-git-send-email-raviteja.narayanam@xilinx.com>
Date: Thu, 9 Apr 2020 11:56:03 +0530
From: Raviteja Narayanam <raviteja.narayanam@...inx.com>
To: linux-serial@...r.kernel.org
Cc: gregkh@...uxfoundation.org, jslaby@...e.com,
michal.simek@...inx.com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, git@...inx.com,
Raviteja Narayanam <raviteja.narayanam@...inx.com>
Subject: [PATCH v2 2/2] 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@...inx.com>
---
drivers/tty/serial/xilinx_uartps.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 0bf946b..042aa6f 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 */
--
2.7.4
Powered by blists - more mailing lists