2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 20:23:57 +08:00

serial: imx: fix polarity of RI

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

Fixes: 90ebc48386 ("serial: imx: repair and complete handshaking")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Uwe Kleine-König 2016-03-24 14:24:20 +01:00 committed by Greg Kroah-Hartman
parent 06ed48b7ee
commit e881d3f3fa

View File

@ -800,9 +800,9 @@ static unsigned int imx_get_hwmctrl(struct imx_port *sport)
if (!(usr1 & USR2_DCDIN))
tmp |= TIOCM_CAR;
/* in DCE mode RIIN is always 0 */
if (readl(sport->port.membase + USR2) & USR2_RIIN)
tmp |= TIOCM_RI;
if (sport->dte_mode)
if (!(readl(sport->port.membase + USR2) & USR2_RIIN))
tmp |= TIOCM_RI;
return tmp;
}