diff options
author | Raviteja Narayanam <raviteja.narayanam@xilinx.com> | 2020-03-19 15:14:50 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-24 12:23:03 +0100 |
commit | 97451855cc3bb9ab0c222a44a66f068278ff6ccb (patch) | |
tree | 60c060ad7896ed9a66a716a27a6e90d7c766564e | |
parent | cbf580ff093861f021b31b2f8d0f03173fb58520 (diff) | |
download | linux-stable-97451855cc3bb9ab0c222a44a66f068278ff6ccb.tar.gz linux-stable-97451855cc3bb9ab0c222a44a66f068278ff6ccb.tar.bz2 linux-stable-97451855cc3bb9ab0c222a44a66f068278ff6ccb.zip |
serial: uartps: Remove unconditional wait inside set_termios
set_termios function should not wait for the transmit FIFO empty
(CDNS_UART_SR_TXEMPTY) unconditionally. The tty layer takes care
of it based on the parameter passed (TCSANOW/TCSADRAIN/TCSAFLUSH).
Signed-off-by: Raviteja Narayanam <raviteja.narayanam@xilinx.com>
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://lore.kernel.org/r/536e190dd5bbb474007a67e6323c048288942a28.1584610774.git.shubhrajyoti.datta@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/xilinx_uartps.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 98db9dc168ff..f3658fc49029 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -693,20 +693,8 @@ static void cdns_uart_set_termios(struct uart_port *port, u32 cval = 0; unsigned int baud, minbaud, maxbaud; unsigned long flags; - unsigned int ctrl_reg, mode_reg, val; - int err; - - /* Wait for the transmit FIFO to empty before making changes */ - if (!(readl(port->membase + CDNS_UART_CR) & - CDNS_UART_CR_TX_DIS)) { - err = readl_poll_timeout(port->membase + CDNS_UART_SR, - val, (val & CDNS_UART_SR_TXEMPTY), - 1000, TX_TIMEOUT); - if (err) { - dev_err(port->dev, "timed out waiting for tx empty"); - return; - } - } + unsigned int ctrl_reg, mode_reg; + spin_lock_irqsave(&port->lock, flags); /* Disable the TX and RX to set baud rate */ |