mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 19:35:00 +07:00
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>
This commit is contained in:
parent
cbf580ff09
commit
97451855cc
@ -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;
|
||||
unsigned int ctrl_reg, mode_reg;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
spin_lock_irqsave(&port->lock, flags);
|
||||
|
||||
/* Disable the TX and RX to set baud rate */
|
||||
|
Loading…
Reference in New Issue
Block a user