aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/xilinx_uartps.c
diff options
context:
space:
mode:
authorSoren Brinkmann <soren.brinkmann@xilinx.com>2015-12-26 05:43:51 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-07 01:52:09 -0500
commitea8dd8e585761c2811d0566938983868d89976a8 (patch)
tree458f6e2dff39970a55c398e393aa55e5584f7264 /drivers/tty/serial/xilinx_uartps.c
parentf0f54a806b2df97485519a7c4ebc45feed08a306 (diff)
tty: xuartps: Don't consider circular buffer when enabling transmitter
Restarting the transmitter even if the circ buffer is empty may be necessary to push out remaining data when the port is restarted after being stopped. Cc: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Reviewed-by: Peter Hurley <peter@hurleysoftware.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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 2c98c357d9a0..6a7cd4e057ae 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -512,7 +512,7 @@ static void cdns_uart_start_tx(struct uart_port *port)
512{ 512{
513 unsigned int status, numbytes = port->fifosize; 513 unsigned int status, numbytes = port->fifosize;
514 514
515 if (uart_circ_empty(&port->state->xmit) || uart_tx_stopped(port)) 515 if (uart_tx_stopped(port))
516 return; 516 return;
517 517
518 /* 518 /*
@@ -524,6 +524,9 @@ static void cdns_uart_start_tx(struct uart_port *port)
524 status |= CDNS_UART_CR_TX_EN; 524 status |= CDNS_UART_CR_TX_EN;
525 writel(status, port->membase + CDNS_UART_CR_OFFSET); 525 writel(status, port->membase + CDNS_UART_CR_OFFSET);
526 526
527 if (uart_circ_empty(&port->state->xmit))
528 return;
529
527 while (numbytes-- && ((readl(port->membase + CDNS_UART_SR_OFFSET) & 530 while (numbytes-- && ((readl(port->membase + CDNS_UART_SR_OFFSET) &
528 CDNS_UART_SR_TXFULL)) != CDNS_UART_SR_TXFULL) { 531 CDNS_UART_SR_TXFULL)) != CDNS_UART_SR_TXFULL) {
529 /* Break if no more data available in the UART buffer */ 532 /* Break if no more data available in the UART buffer */