aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorFugang Duan <B38611@freescale.com>2014-09-19 03:26:40 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-28 21:26:38 -0400
commitbb2f861ad00fc09dab955d22280c51cead795bca (patch)
tree54ecf730dc299067a5c13d22f658549bc20325e7 /drivers/tty
parent1ede7dcca3c4fa15a518ab0473126f9c3e621e4c (diff)
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: Fugang Duan <B38611@freescale.com> Signed-off-by: Huang Shijie <shijie8@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/imx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index be13eb39fbf4..c7683d747c18 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -817,11 +817,9 @@ static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl)
817 struct imx_port *sport = (struct imx_port *)port; 817 struct imx_port *sport = (struct imx_port *)port;
818 unsigned long temp; 818 unsigned long temp;
819 819
820 temp = readl(sport->port.membase + UCR2) & ~UCR2_CTS; 820 temp = readl(sport->port.membase + UCR2) & ~(UCR2_CTS | UCR2_CTSC);
821
822 if (mctrl & TIOCM_RTS) 821 if (mctrl & TIOCM_RTS)
823 if (!sport->dma_is_enabled) 822 temp |= UCR2_CTS | UCR2_CTSC;
824 temp |= UCR2_CTS;
825 823
826 writel(temp, sport->port.membase + UCR2); 824 writel(temp, sport->port.membase + UCR2);
827 825