All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+kernel@arm.linux.org.uk>
To: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Subject: [PATCH 05/11] SERIAL: omap: allow hardware assisted rts/cts modes to be disabled
Date: Tue, 16 Oct 2012 11:59:24 +0100	[thread overview]
Message-ID: <E1TO4rs-0000WD-Mx@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20121016101458.GZ21164@n2100.arm.linux.org.uk>

There is nothing which clears the auto RTS/CTS bits, so once hardware
flow control gets enabled, there's no possibility to disable it.
So, clear these bits when CRTSCTS is cleared.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 drivers/tty/serial/omap-serial.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 6ede6fd..c55af63 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -921,6 +921,13 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
 		serial_out(up, UART_LCR, UART_LCR_CONF_MODE_A);
 		serial_out(up, UART_MCR, up->mcr | UART_MCR_RTS);
 		serial_out(up, UART_LCR, cval);
+	} else {
+		/* Disable AUTORTS and AUTOCTS */
+		up->efr &= ~(UART_EFR_CTS | UART_EFR_RTS);
+
+		serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
+		serial_out(up, UART_EFR, up->efr);
+		serial_out(up, UART_LCR, cval);
 	}
 
 	serial_omap_set_mctrl(&up->port, up->port.mctrl);
-- 
1.7.4.4


WARNING: multiple messages have this Message-ID (diff)
From: rmk+kernel@arm.linux.org.uk (Russell King)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/11] SERIAL: omap: allow hardware assisted rts/cts modes to be disabled
Date: Tue, 16 Oct 2012 11:59:24 +0100	[thread overview]
Message-ID: <E1TO4rs-0000WD-Mx@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20121016101458.GZ21164@n2100.arm.linux.org.uk>

There is nothing which clears the auto RTS/CTS bits, so once hardware
flow control gets enabled, there's no possibility to disable it.
So, clear these bits when CRTSCTS is cleared.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 drivers/tty/serial/omap-serial.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 6ede6fd..c55af63 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -921,6 +921,13 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
 		serial_out(up, UART_LCR, UART_LCR_CONF_MODE_A);
 		serial_out(up, UART_MCR, up->mcr | UART_MCR_RTS);
 		serial_out(up, UART_LCR, cval);
+	} else {
+		/* Disable AUTORTS and AUTOCTS */
+		up->efr &= ~(UART_EFR_CTS | UART_EFR_RTS);
+
+		serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
+		serial_out(up, UART_EFR, up->efr);
+		serial_out(up, UART_LCR, cval);
 	}
 
 	serial_omap_set_mctrl(&up->port, up->port.mctrl);
-- 
1.7.4.4

  parent reply	other threads:[~2012-10-16 10:59 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-16 10:14 [PATCH 00/11] Minimum set of omap serial patches to fix merge window breakage Russell King - ARM Linux
2012-10-16 10:14 ` Russell King - ARM Linux
2012-10-16 10:58 ` [PATCH 01/11] SERIAL: core: use local variable uport in uart_set_termios() Russell King
2012-10-16 10:58   ` Russell King
2012-10-16 10:58 ` [PATCH 02/11] SERIAL: core: add hardware assisted s/w flow control support Russell King
2012-10-16 10:58   ` Russell King
2012-10-16 10:58 ` [PATCH 03/11] SERIAL: core: add hardware assisted h/w " Russell King
2012-10-16 10:58   ` Russell King
2012-10-16 10:59 ` [PATCH 04/11] SERIAL: core: add throttle/unthrottle callbacks for hardware assisted flow control Russell King
2012-10-16 10:59   ` Russell King
2012-10-16 10:59 ` Russell King [this message]
2012-10-16 10:59   ` [PATCH 05/11] SERIAL: omap: allow hardware assisted rts/cts modes to be disabled Russell King
2012-10-16 10:59 ` [PATCH 06/11] SERIAL: omap: allow hardware assisted IXANY mode " Russell King
2012-10-16 10:59   ` Russell King
2012-10-16 11:00 ` [PATCH 07/11] SERIAL: omap: remove setting of EFR SCD bit Russell King
2012-10-16 11:00   ` Russell King
2012-10-16 11:00 ` [PATCH 08/11] SERIAL: omap: no need to re-read EFR Russell King
2012-10-16 11:00   ` Russell King
2012-10-16 11:00 ` [PATCH 09/11] SERIAL: omap: fix set_mctrl() breakage Russell King
2012-10-16 11:00   ` Russell King
2012-10-16 11:01 ` [PATCH 10/11] SERIAL: omap: fix MCR TCRTLR bit handling Russell King
2012-10-16 11:01   ` Russell King
2012-10-16 11:12   ` Russell King - ARM Linux
2012-10-16 11:12     ` Russell King - ARM Linux
2012-10-16 11:01 ` [PATCH 11/11] SERIAL: omap: fix hardware assisted flow control Russell King
2012-10-16 11:01   ` Russell King
2012-10-16 11:20 ` [PATCH 00/11] Minimum set of omap serial patches to fix merge window breakage Russell King - ARM Linux
2012-10-16 11:20   ` Russell King - ARM Linux
2012-10-16 15:53 ` Tony Lindgren
2012-10-16 15:53   ` Tony Lindgren

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=E1TO4rs-0000WD-Mx@rmk-PC.arm.linux.org.uk \
    --to=rmk+kernel@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    /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 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.