summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/fsl_lpuart.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-05 07:59:28 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-05 07:59:28 +0200
commit35f2e3c267f07a42bc1bf08081e963b3a33e6d7c (patch)
treecab274350db930656d6ea9a0c9989f210acf4722 /drivers/tty/serial/fsl_lpuart.c
parenttty: mxser: remove redundant assignment to hwid (diff)
parentLinux 6.0-rc4 (diff)
downloadlinux-35f2e3c267f07a42bc1bf08081e963b3a33e6d7c.tar.xz
linux-35f2e3c267f07a42bc1bf08081e963b3a33e6d7c.zip
Merge 6.0-rc4 into tty-next
We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/fsl_lpuart.c')
-rw-r--r--drivers/tty/serial/fsl_lpuart.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index c8a010c41e39..f21915015d67 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1389,9 +1389,9 @@ static int lpuart_config_rs485(struct uart_port *port, struct ktermios *termios,
* Note: UART is assumed to be active high.
*/
if (rs485->flags & SER_RS485_RTS_ON_SEND)
- modem &= ~UARTMODEM_TXRTSPOL;
- else if (rs485->flags & SER_RS485_RTS_AFTER_SEND)
modem |= UARTMODEM_TXRTSPOL;
+ else if (rs485->flags & SER_RS485_RTS_AFTER_SEND)
+ modem &= ~UARTMODEM_TXRTSPOL;
}
writeb(modem, sport->port.membase + UARTMODEM);
@@ -2186,6 +2186,7 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,
uart_update_timeout(port, termios->c_cflag, baud);
/* wait transmit engin complete */
+ lpuart32_write(&sport->port, 0, UARTMODIR);
lpuart32_wait_bit_set(&sport->port, UARTSTAT, UARTSTAT_TC);
/* disable transmit and receive */