mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philippe Schenker <philippe.schenker@toradex.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Cc: Max Krummenacher <max.krummenacher@toradex.com>,
	Jiri Slaby <jslaby@suse.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Fugang Duan <fugang.duan@nxp.com>, Stefan Agner <stefan@agner.ch>,
	"linux-imx@nxp.com" <linux-imx@nxp.com>,
	Andrey Smirnov <andrew.smirnov@gmail.com>,
	Philippe Schenker <philippe.schenker@toradex.com>
Subject: [PATCH v1 1/3] tty: serial: lpuart: Remove unnecessary code from set_mctrl
Date: Wed, 16 Oct 2019 15:18:56 +0000	[thread overview]
Message-ID: <20191016151845.15859-1-philippe.schenker@toradex.com> (raw)

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


             reply	other threads:[~2019-10-16 15:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 15:18 Philippe Schenker [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191016151845.15859-1-philippe.schenker@toradex.com \
    --to=philippe.schenker@toradex.com \
    --cc=andrew.smirnov@gmail.com \
    --cc=fugang.duan@nxp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=max.krummenacher@toradex.com \
    --cc=stefan@agner.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®