All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/3] tty: serial: lpuart: Remove unnecessary code from set_mctrl
@ 2019-10-16 15:18 Philippe Schenker
  2019-10-16 15:18 ` [PATCH v1 2/3] tty: serial: lpuart: Use defines that correspond to correct register Philippe Schenker
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Philippe Schenker @ 2019-10-16 15:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial
  Cc: Max Krummenacher, Jiri Slaby, linux-kernel, Fugang Duan,
	Stefan Agner, linux-imx, Andrey Smirnov, Philippe Schenker

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@toradex.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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-10-17  8:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 15:18 [PATCH v1 1/3] tty: serial: lpuart: Remove unnecessary code from set_mctrl Philippe Schenker
2019-10-16 15:18 ` [PATCH v1 2/3] tty: serial: lpuart: Use defines that correspond to correct register Philippe Schenker
2019-10-16 20:22   ` Stefan Agner
2019-10-17  8:09     ` Philippe Schenker
2019-10-17  5:13   ` [EXT] " Andy Duan
2019-10-16 15:18 ` [PATCH v1 3/3] tty: serial: lpuart: Add RS485 support for 32-bit uart flavour Philippe Schenker
2019-10-17  5:14   ` [EXT] " Andy Duan
2019-10-17  5:13 ` [EXT] [PATCH v1 1/3] tty: serial: lpuart: Remove unnecessary code from set_mctrl Andy Duan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.