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:
parent
06ed48b7ee
commit
e881d3f3fa
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user