Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6e7d6ba authored by Fabio Estevam's avatar Fabio Estevam Committed by Greg Kroah-Hartman
Browse files

serial: imx: Only wakeup via RTSDEN bit if the system has RTS/CTS



commit 38b1f0fb42f772b8c9aac53593883a18ff5eb9d7 upstream.

The wakeup mechanism via RTSDEN bit relies on the system using the RTS/CTS
lines, so only allow such wakeup method when the system actually has
RTS/CTS support.

Fixes: bc85734b ("serial: imx: allow waking up on RTSD")
Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: default avatarMartin Kaiser <martin@kaiser.cx>
Acked-by: default avatarFugang Duan <fugang.duan@nxp.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 24293a39
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -2275,6 +2275,7 @@ static void serial_imx_enable_wakeup(struct imx_port *sport, bool on)
		val &= ~UCR3_AWAKEN;
	writel(val, sport->port.membase + UCR3);

	if (sport->have_rtscts) {
		val = readl(sport->port.membase + UCR1);
		if (on)
			val |= UCR1_RTSDEN;
@@ -2282,6 +2283,7 @@ static void serial_imx_enable_wakeup(struct imx_port *sport, bool on)
			val &= ~UCR1_RTSDEN;
		writel(val, sport->port.membase + UCR1);
	}
}

static int imx_serial_port_suspend_noirq(struct device *dev)
{