summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorIsrael Perez <B37753@freescale.com>2013-11-28 15:00:33 +0800
committerHuang Shijie <b32955@freescale.com>2013-11-28 16:17:14 +0800
commit5d01a36741efc77a36a78953c9b7f93a93fecdf9 (patch)
treeeffe260c67cc5f28ff7de4f23c1cbe4fe532cefb /drivers/tty
parent22a0484d177705f7da69db2036e0a5dce1e2180f (diff)
ENGR00211653 [MX6Q ARD] IMX UART add support for loopback mode.
ttymxc serial uart driver add support loopback mode. returns TIOCM_LOOP set when reading the status. [original hash:42d5723 fix a litte for 3.10.17] Signed-off-by: Israel Perez <B37753@freescale.com> Signed-off-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/imx.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index b2cfdb661947..d799140e53b6 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -806,6 +806,9 @@ static unsigned int imx_get_mctrl(struct uart_port *port)
if (readl(sport->port.membase + UCR2) & UCR2_CTS)
tmp |= TIOCM_RTS;
+ if (readl(sport->port.membase + uts_reg(sport)) & UTS_LOOP)
+ tmp |= TIOCM_LOOP;
+
return tmp;
}
@@ -821,6 +824,11 @@ static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl)
temp |= UCR2_CTS;
writel(temp, sport->port.membase + UCR2);
+
+ temp = readl(sport->port.membase + uts_reg(sport)) & ~UTS_LOOP;
+ if (mctrl & TIOCM_LOOP)
+ temp |= UTS_LOOP;
+ writel(temp, sport->port.membase + uts_reg(sport));
}
/*