linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: imx: Enable RTSD only when needed
@ 2017-04-12 13:30 Romain Perier
  2017-04-12 13:38 ` Fabio Estevam
  0 siblings, 1 reply; 3+ messages in thread
From: Romain Perier @ 2017-04-12 13:30 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>
---
 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 e3e152cb..6dd674f 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1294,7 +1294,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);
 
-- 
2.9.3

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

* Re: [PATCH] serial: imx: Enable RTSD only when needed
  2017-04-12 13:30 [PATCH] serial: imx: Enable RTSD only when needed Romain Perier
@ 2017-04-12 13:38 ` Fabio Estevam
  2017-04-26  7:17   ` Romain Perier
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2017-04-12 13:38 UTC (permalink / raw)
  To: Romain Perier
  Cc: Greg Kroah-Hartman, linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, Nandor Han

On Wed, Apr 12, 2017 at 10:30 AM, Romain Perier
<romain.perier@collabora.com> wrote:
> 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>

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

* Re: [PATCH] serial: imx: Enable RTSD only when needed
  2017-04-12 13:38 ` Fabio Estevam
@ 2017-04-26  7:17   ` Romain Perier
  0 siblings, 0 replies; 3+ messages in thread
From: Romain Perier @ 2017-04-26  7:17 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Greg Kroah-Hartman, linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, Nandor Han

Hello all,


Le 12/04/2017 à 15:38, Fabio Estevam a écrit :
> On Wed, Apr 12, 2017 at 10:30 AM, Romain Perier
> <romain.perier@collabora.com> wrote:
>> 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>

No more feedback on this patch ?

Regards,
Romain


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2017-04-26  7:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-12 13:30 [PATCH] serial: imx: Enable RTSD only when needed Romain Perier
2017-04-12 13:38 ` Fabio Estevam
2017-04-26  7:17   ` Romain Perier

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).