From: Nandor Han Date: Wed, 28 Jun 2017 13:59:36 +0000 (+0200) Subject: serial: imx: Enable RTSD only when needed X-Git-Tag: v4.13-rc1~183^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6376cd39ea0b9a56c3ddfb8c794b7322a7029b63;p=thirdparty%2Fkernel%2Flinux.git serial: imx: Enable RTSD only when needed Currently, this IRQ is always enabled. Some devices might mux these pins to other I/Os, like I2C. This could lead to spurious interrupts. This commit makes this IRQ optional, by using the field have_rtscts. Signed-off-by: Nandor Han Signed-off-by: Romain Perier Reviewed-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index cbaf852120746..e33da75ceac57 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1299,7 +1299,9 @@ static int imx_startup(struct uart_port *port) imx_enable_dma(sport); temp = readl(sport->port.membase + UCR1); - temp |= UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN; + temp |= UCR1_RRDYEN | UCR1_UARTEN; + if (sport->have_rtscts) + temp |= UCR1_RTSDEN; writel(temp, sport->port.membase + UCR1);