Skip to content

Commit d57d56e

Browse files
SherrySun5gregkh
authored andcommitted
tty: serial: fsl_lpuart: use UARTMODIR register bits for lpuart32 platform
For lpuart32 platforms, UARTMODIR register is used instead of UARTMODEM. So here should configure the corresponding UARTMODIR register bits to avoid confusion. Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Sherry Sun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f73fd75 commit d57d56e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/tty/serial/fsl_lpuart.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,12 +1406,12 @@ static int lpuart32_config_rs485(struct uart_port *port, struct ktermios *termio
14061406
struct lpuart_port, port);
14071407

14081408
unsigned long modem = lpuart32_read(&sport->port, UARTMODIR)
1409-
& ~(UARTMODEM_TXRTSPOL | UARTMODEM_TXRTSE);
1409+
& ~(UARTMODIR_TXRTSPOL | UARTMODIR_TXRTSE);
14101410
lpuart32_write(&sport->port, modem, UARTMODIR);
14111411

14121412
if (rs485->flags & SER_RS485_ENABLED) {
14131413
/* Enable auto RS-485 RTS mode */
1414-
modem |= UARTMODEM_TXRTSE;
1414+
modem |= UARTMODIR_TXRTSE;
14151415

14161416
/*
14171417
* The hardware defaults to RTS logic HIGH while transfer.
@@ -1420,9 +1420,9 @@ static int lpuart32_config_rs485(struct uart_port *port, struct ktermios *termio
14201420
* Note: UART is assumed to be active high.
14211421
*/
14221422
if (rs485->flags & SER_RS485_RTS_ON_SEND)
1423-
modem |= UARTMODEM_TXRTSPOL;
1423+
modem |= UARTMODIR_TXRTSPOL;
14241424
else if (rs485->flags & SER_RS485_RTS_AFTER_SEND)
1425-
modem &= ~UARTMODEM_TXRTSPOL;
1425+
modem &= ~UARTMODIR_TXRTSPOL;
14261426
}
14271427

14281428
lpuart32_write(&sport->port, modem, UARTMODIR);

0 commit comments

Comments
 (0)