提交 e881d3f3 编写于 作者: U Uwe Kleine-König 提交者: Greg Kroah-Hartman

serial: imx: fix polarity of RI

When in DTE mode, the bit USR2_RIIN is active low. So invert the logic
accordingly.

Fixes: 90ebc483 ("serial: imx: repair and complete handshaking")
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 06ed48b7
...@@ -800,9 +800,9 @@ static unsigned int imx_get_hwmctrl(struct imx_port *sport) ...@@ -800,9 +800,9 @@ static unsigned int imx_get_hwmctrl(struct imx_port *sport)
if (!(usr1 & USR2_DCDIN)) if (!(usr1 & USR2_DCDIN))
tmp |= TIOCM_CAR; tmp |= TIOCM_CAR;
/* in DCE mode RIIN is always 0 */ if (sport->dte_mode)
if (readl(sport->port.membase + USR2) & USR2_RIIN) if (!(readl(sport->port.membase + USR2) & USR2_RIIN))
tmp |= TIOCM_RI; tmp |= TIOCM_RI;
return tmp; return tmp;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册