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: Raviteja Narayanam <raviteja.narayanam@xilinx.com> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Acked-by: Maarten Brock <m.brock@vanmierlo.com> Link: https://lore.kernel.org/r/e2514818af5973be291cc117d07739f068b71639.1584610774.git.shubhrajyoti.datta@xilinx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
97451855cc
commit
706bbc572d
|
@ -650,8 +650,8 @@ static unsigned int cdns_uart_tx_empty(struct uart_port *port)
|
|||
unsigned int status;
|
||||
|
||||
status = readl(port->membase + CDNS_UART_SR) &
|
||||
CDNS_UART_SR_TXEMPTY;
|
||||
return status ? TIOCSER_TEMT : 0;
|
||||
(CDNS_UART_SR_TXEMPTY | CDNS_UART_SR_TACTIVE);
|
||||
return (status == CDNS_UART_SR_TXEMPTY) ? TIOCSER_TEMT : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue