Skip to content

Commit

Permalink
serial: imx: fix throttle/unthrottle callbacks for hardware assisted …
Browse files Browse the repository at this point in the history
…flow control

when the 'CTSC' bit is negated. 'CTS' has no function when 'CTSC' is asserted.
0: The CTS pin is high (inactive)
1: The CTS pin is low (active)

For throttle, it needs to clear 'CTS' and 'CTSC' bits.
For unthrottle, it needs to enable 'CTS' and 'CTSC' bits.

The patch just fix the issue.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Fugang Duan authored and Greg Kroah-Hartman committed Sep 29, 2014
1 parent 1ede7dc commit bb2f861
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/tty/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,11 +817,9 @@ static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl)
struct imx_port *sport = (struct imx_port *)port;
unsigned long temp;

temp = readl(sport->port.membase + UCR2) & ~UCR2_CTS;

temp = readl(sport->port.membase + UCR2) & ~(UCR2_CTS | UCR2_CTSC);
if (mctrl & TIOCM_RTS)
if (!sport->dma_is_enabled)
temp |= UCR2_CTS;
temp |= UCR2_CTS | UCR2_CTSC;

writel(temp, sport->port.membase + UCR2);

Expand Down

0 comments on commit bb2f861

Please sign in to comment.