[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR0402MB3600A060EE349ED54559610BFF6D0@VI1PR0402MB3600.eurprd04.prod.outlook.com>
Date: Thu, 17 Oct 2019 05:13:14 +0000
From: Andy Duan <fugang.duan@....com>
To: Philippe Schenker <philippe.schenker@...adex.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>
CC: Max Krummenacher <max.krummenacher@...adex.com>,
Jiri Slaby <jslaby@...e.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Stefan Agner <stefan@...er.ch>,
dl-linux-imx <linux-imx@....com>,
Andrey Smirnov <andrew.smirnov@...il.com>
Subject: RE: [EXT] [PATCH v1 1/3] tty: serial: lpuart: Remove unnecessary code
from set_mctrl
From: Philippe Schenker <philippe.schenker@...adex.com> Sent: Wednesday, October 16, 2019 11:19 PM
> Currently flow control is not working due to lpuart32_set_mctrl that is
> clearing TXCTSE bit in all cases. This bit gets earlier setup by
> lpuart32_set_termios.
>
> As I read in Documentation set_mctrl is also not meant for hardware flow
> control rather than gpio setting and clearing a RTS signal.
> Therefore I guess it is safe to remove the whole code in lpuart32_set_mctrl.
>
> This was tested with console on a i.MX8QXP SoC.
>
> Signed-off-by: Philippe Schenker <philippe.schenker@...adex.com>
Reviewed-by: Fugang Duan <fugang.duan@....com>
> ---
>
> drivers/tty/serial/fsl_lpuart.c | 11 -----------
> 1 file changed, 11 deletions(-)
>
> diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index
> 537896c4d887..f3271857621c 100644
> --- a/drivers/tty/serial/fsl_lpuart.c
> +++ b/drivers/tty/serial/fsl_lpuart.c
> @@ -1333,18 +1333,7 @@ static void lpuart_set_mctrl(struct uart_port
> *port, unsigned int mctrl)
>
> static void lpuart32_set_mctrl(struct uart_port *port, unsigned int mctrl) {
> - unsigned long temp;
> -
> - temp = lpuart32_read(port, UARTMODIR) &
> - ~(UARTMODIR_RXRTSE |
> UARTMODIR_TXCTSE);
> -
> - if (mctrl & TIOCM_RTS)
> - temp |= UARTMODIR_RXRTSE;
> -
> - if (mctrl & TIOCM_CTS)
> - temp |= UARTMODIR_TXCTSE;
>
> - lpuart32_write(port, temp, UARTMODIR);
> }
>
> static void lpuart_break_ctl(struct uart_port *port, int break_state)
> --
> 2.23.0
Powered by blists - more mailing lists