serial: 8250: fix bug rts is inactive when auto flow is enable

To save mcr value when uart is reset for setting baudrate.

Change-Id: I1a4fcd78498cf4f601d0c8461d1db67dc0ed6f9e
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
This commit is contained in:
Huibin Hong
2024-04-26 10:25:00 +08:00
committed by Tao Huang
parent 12fd5673bd
commit f99134904e

View File

@@ -2712,6 +2712,7 @@ void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud,
struct uart_8250_port *up = up_to_u8250p(port);
#ifdef CONFIG_ARCH_ROCKCHIP
int mcr = serial_port_in(port, UART_MCR);
serial_port_out(port, UART_MCR, UART_MCR_LOOP);
#endif
/* Workaround to enable 115200 baud on OMAP1510 internal ports */
@@ -2741,7 +2742,7 @@ void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud,
if (port->type != PORT_16750)
serial_port_out(port, UART_LCR, up->lcr); /* reset DLAB */
serial_port_out(port, UART_MCR, up->mcr);
serial_port_out(port, UART_MCR, mcr);
#endif
}
EXPORT_SYMBOL_GPL(serial8250_do_set_divisor);