linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] serial: imx: Enable RTSD only when needed
@ 2017-06-28 13:59 Romain Perier
  2017-06-29 18:18 ` Uwe Kleine-König
  0 siblings, 1 reply; 2+ messages in thread
From: Romain Perier @ 2017-06-28 13:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Romain Perier, linux-arm-kernel, linux-serial, Nandor Han

From: Nandor Han <nandor.han@ge.com>

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 <nandor.han@ge.com>
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 drivers/tty/serial/imx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 7327477..5437b34 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1302,7 +1302,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);
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH RESEND] serial: imx: Enable RTSD only when needed
  2017-06-28 13:59 [PATCH RESEND] serial: imx: Enable RTSD only when needed Romain Perier
@ 2017-06-29 18:18 ` Uwe Kleine-König
  0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2017-06-29 18:18 UTC (permalink / raw)
  To: Romain Perier
  Cc: Greg Kroah-Hartman, linux-arm-kernel, linux-serial, Nandor Han

Hello,

On Wed, Jun 28, 2017 at 03:59:36PM +0200, Romain Perier wrote:
> +	temp |= UCR1_RRDYEN | UCR1_UARTEN;
> +	if (sport->have_rtscts)
> +			temp |= UCR1_RTSDEN;

There is a tab too much.
 
>  	writel(temp, sport->port.membase + UCR1);

Other than that:
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-29 18:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-28 13:59 [PATCH RESEND] serial: imx: Enable RTSD only when needed Romain Perier
2017-06-29 18:18 ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).