[ 32/33] mxs: uart: fix setting RTS from software

From: Greg Kroah-Hartman
Date: Fri Jan 18 2013 - 20:18:22 EST


3.7-stable review patch. If anyone has any objections, please let me know.

------------------

From: Steffen Trumtrar <s.trumtrar@xxxxxxxxxxxxxx>

commit a6833214cfc6fa8a7c59426af77794cc190c6cfc upstream.

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@xxxxxxxxxxxxxx>
Reviewed-by: Huang Shijie <b32955@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
drivers/tty/serial/mxs-auart.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -260,10 +260,12 @@ static void mxs_auart_set_mctrl(struct u

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;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/