From: Fabio Estevam <festevam@xxxxxxxxx> Sent: Friday, January 05, 2018 1:59 AM >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: bc85734b126f ("serial: imx: allow waking up on RTSD") >Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxx> >--- > drivers/tty/serial/imx.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > >diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index >c2b29fd..7143da3 100644 >--- a/drivers/tty/serial/imx.c >+++ b/drivers/tty/serial/imx.c >@@ -2225,12 +2225,14 @@ static void serial_imx_enable_wakeup(struct >imx_port *sport, bool on) > val &= ~UCR3_AWAKEN; > writel(val, sport->port.membase + UCR3); > >- val = readl(sport->port.membase + UCR1); >- if (on) >- val |= UCR1_RTSDEN; >- else >- val &= ~UCR1_RTSDEN; >- writel(val, sport->port.membase + UCR1); >+ if (sport->have_rtscts) { >+ val = readl(sport->port.membase + UCR1); >+ if (on) >+ val |= UCR1_RTSDEN; >+ else >+ val &= ~UCR1_RTSDEN; >+ writel(val, sport->port.membase + UCR1); >+ } > } > > static int imx_serial_port_suspend_noirq(struct device *dev) >-- >2.7.4 Acked-by: Fugang Duan <fugang.duan@xxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html