Commit bb2f861a authored by Fugang Duan's avatar Fugang Duan Committed by Greg Kroah-Hartman

serial: imx: fix throttle/unthrottle callbacks for hardware assisted 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: default avatarFugang Duan <B38611@freescale.com>
Signed-off-by: default avatarHuang Shijie <shijie8@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1ede7dcc
...@@ -817,11 +817,9 @@ static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl) ...@@ -817,11 +817,9 @@ static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl)
struct imx_port *sport = (struct imx_port *)port; struct imx_port *sport = (struct imx_port *)port;
unsigned long temp; 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 (mctrl & TIOCM_RTS)
if (!sport->dma_is_enabled) temp |= UCR2_CTS | UCR2_CTSC;
temp |= UCR2_CTS;
writel(temp, sport->port.membase + UCR2); writel(temp, sport->port.membase + UCR2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment