linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] mxs: uart: allow setting RTS from software
@ 2012-12-13 13:27 Steffen Trumtrar
  2012-12-14  2:27 ` Huang Shijie
  0 siblings, 1 reply; 4+ messages in thread
From: Steffen Trumtrar @ 2012-12-13 13:27 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 drivers/tty/serial/mxs-auart.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 6db23b0..9f63f88 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;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v3] mxs: uart: allow setting RTS from software
  2012-12-13 13:27 [PATCH v3] mxs: uart: allow setting RTS from software Steffen Trumtrar
@ 2012-12-14  2:27 ` Huang Shijie
  2013-01-07  9:43   ` Marc Kleine-Budde
  0 siblings, 1 reply; 4+ messages in thread
From: Huang Shijie @ 2012-12-14  2:27 UTC (permalink / raw)
  To: linux-arm-kernel

? 2012?12?13? 21:27, 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 <s.trumtrar@pengutronix.de>
> ---
>  drivers/tty/serial/mxs-auart.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
> index 6db23b0..9f63f88 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;
Reviewed-by: Huang Shijie <b32955@freescale.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3] mxs: uart: allow setting RTS from software
  2012-12-14  2:27 ` Huang Shijie
@ 2013-01-07  9:43   ` Marc Kleine-Budde
  2013-01-08  1:06     ` Shawn Guo
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2013-01-07  9:43 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/14/2012 03:27 AM, Huang Shijie wrote:
> ? 2012?12?13? 21:27, 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 <s.trumtrar@pengutronix.de>
>> ---
>>  drivers/tty/serial/mxs-auart.c |    4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
>> index 6db23b0..9f63f88 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;
> Reviewed-by: Huang Shijie <b32955@freescale.com>

This patch is not not in today's next. What's the current status? Who
will take it?

Marc
-- 
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3] mxs: uart: allow setting RTS from software
  2013-01-07  9:43   ` Marc Kleine-Budde
@ 2013-01-08  1:06     ` Shawn Guo
  0 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2013-01-08  1:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 07, 2013 at 10:43:38AM +0100, Marc Kleine-Budde wrote:
> On 12/14/2012 03:27 AM, Huang Shijie wrote:
> > ? 2012?12?13? 21:27, 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 <s.trumtrar@pengutronix.de>
> >> ---
> >>  drivers/tty/serial/mxs-auart.c |    4 +++-
> >>  1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
> >> index 6db23b0..9f63f88 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;
> > Reviewed-by: Huang Shijie <b32955@freescale.com>
> 
> This patch is not not in today's next. What's the current status? Who
> will take it?
> 
I see stable at vger.kernel.org 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 <gregkh@linuxfoundation.org> who
is collecting serial patches believe.

Shawn

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-08  1:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-13 13:27 [PATCH v3] mxs: uart: allow setting RTS from software Steffen Trumtrar
2012-12-14  2:27 ` Huang Shijie
2013-01-07  9:43   ` Marc Kleine-Budde
2013-01-08  1:06     ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).