Commit 706bbc57 authored by Raviteja Narayanam's avatar Raviteja Narayanam Committed by Greg Kroah-Hartman

serial: uartps: Add TACTIVE check in cdns_uart_tx_empty function

Make sure that all bytes are transmitted out of Uart by monitoring
CDNS_UART_SR_TACTIVE bit as well.
Signed-off-by: default avatarRaviteja Narayanam <raviteja.narayanam@xilinx.com>
Signed-off-by: default avatarShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Acked-by: default avatarMaarten Brock <m.brock@vanmierlo.com>
Link: https://lore.kernel.org/r/e2514818af5973be291cc117d07739f068b71639.1584610774.git.shubhrajyoti.datta@xilinx.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 97451855
...@@ -650,8 +650,8 @@ static unsigned int cdns_uart_tx_empty(struct uart_port *port) ...@@ -650,8 +650,8 @@ static unsigned int cdns_uart_tx_empty(struct uart_port *port)
unsigned int status; unsigned int status;
status = readl(port->membase + CDNS_UART_SR) & status = readl(port->membase + CDNS_UART_SR) &
CDNS_UART_SR_TXEMPTY; (CDNS_UART_SR_TXEMPTY | CDNS_UART_SR_TACTIVE);
return status ? TIOCSER_TEMT : 0; return (status == CDNS_UART_SR_TXEMPTY) ? TIOCSER_TEMT : 0;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment