summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorSteffen Trumtrar <s.trumtrar@pengutronix.de>2012-12-13 14:27:43 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-15 19:06:41 -0800
commita6833214cfc6fa8a7c59426af77794cc190c6cfc (patch)
tree77e17698e0107c6105a8b18ff3cdffe01afddcac /drivers/tty
parent9931faca02c604c22335f5a935a501bb2ace6e20 (diff)
downloadlinux-3.10-a6833214cfc6fa8a7c59426af77794cc190c6cfc.tar.gz
linux-3.10-a6833214cfc6fa8a7c59426af77794cc190c6cfc.tar.bz2
linux-3.10-a6833214cfc6fa8a7c59426af77794cc190c6cfc.zip
mxs: uart: fix setting RTS from software
With the patch "serial: mxs-auart: fix the wrong RTS hardware flow control" the mainline mxs-uart driver now sets RTSEN only when hardware flow control is enabled via software. It is not possible any longer to set RTS manually via software. However, the manual modification is a valid operation. Regain the possibility to set RTS via software and only set RTSEN when hardware flow control is explicitly enabled via settermios cflag CRTSCTS. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Cc: stable <stable@vger.kernel.org> Reviewed-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/mxs-auart.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 6db23b035ef..9f63f8890a6 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -412,10 +412,12 @@ static void mxs_auart_set_mctrl(struct uart_port *u, unsigned mctrl)
u32 ctrl = readl(u->membase + AUART_CTRL2);
- ctrl &= ~AUART_CTRL2_RTSEN;
+ ctrl &= ~(AUART_CTRL2_RTSEN | AUART_CTRL2_RTS);
if (mctrl & TIOCM_RTS) {
if (tty_port_cts_enabled(&u->state->port))
ctrl |= AUART_CTRL2_RTSEN;
+ else
+ ctrl |= AUART_CTRL2_RTS;
}
s->ctrl = mctrl;