mxs: uart: allow setting RTS from software
Subsystems (2)
PATCH v3 1/1 mxs: uart: allow 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.
--- drivers/tty/serial/mxs-auart.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/tty/serial/mxs-auart.c +3 -1
@@ -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;
Signature · 1 line
1.7.10.4
PATCH v3 1/1 mxs: uart: allow setting RTS from software
? 2012?12?13? 21:27, Steffen Trumtrar ??:
Quoted 20 lines
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 <[email protected]>--- drivers/tty/serial/mxs-auart.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/tty/serial/mxs-auart.c +0
-0@@ -412,10 +412,12 @@ static void mxs_auart_set_mctrl(struct uart_port *u, unsigned mctrl)u32 ctrl =readl (u->membase +AUART_CTRL2 );
drivers/tty/serial/mxs-auart.c static void mxs_auart_set_mctrl(struct uart_port *u, unsigned mctrl) · line 423
Quoted 10 lines
drivers/tty/serial/mxs-auart.c +3
-1- 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;
PATCH v3 1/1 mxs: uart: allow setting RTS from software
Quoted 30 lines · Huang Shijie
? 2012?12?13? 21:27, Steffen Trumtrar ??:
Quoted 29 lines
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 <[email protected]>--- drivers/tty/serial/mxs-auart.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/tty/serial/mxs-auart.c +3
-1@@ -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 ; }
Quoted 2 lines
drivers/tty/serial/mxs-auart.c static void mxs_auart_set_mctrl(struct uart_port *u, unsigned mctrl) · line 423
Quoted 1 line
drivers/tty/serial/mxs-auart.c +0
-0s->ctrl = mctrl;Reviewed-by Huang Shijie <[email protected]>
This patch is not not in today's next. What's the current status? Who will take it?
Marc
Signature · 12 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130107/65c0ab15/attachment.sig>
PATCH v3 1/1 mxs: uart: allow setting RTS from software
Quoted 31 lines · Marc Kleine-Budde
Quoted 30 lines · Huang Shijie
Quoted 29 lines · Steffen Trumtrar
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 <[email protected]>--- drivers/tty/serial/mxs-auart.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/tty/serial/mxs-auart.c +3
-1@@ -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 ; }
Quoted 6 lines
Quoted 2 lines
drivers/tty/serial/mxs-auart.c static void mxs_auart_set_mctrl(struct uart_port *u, unsigned mctrl) · line 423
Quoted 1 line
drivers/tty/serial/mxs-auart.c +0
-0s->ctrl = mctrl;Reviewed-by Huang Shijie <[email protected]>This patch is not not in today's next. What's the current status? Who will take it?
I see [email protected] is on copy. But it's not the correct way submit a fix for stable tree. Check out Documentation/stable_kernel_rules.txt for the correct one.
Remember to copy Greg Kroah-Hartman <[email protected]> who is collecting serial patches believe.
Shawn
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html