Re: [PATCH 2/2] serial: imx: disable the receiver ready interrupt for imx_stop_rx

From: Dirk Behme
Date: Fri May 30 2014 - 01:52:36 EST


On 23.05.2014 06:32, Huang Shijie wrote:
This patch disables the receiver ready interrupt for imx_stop_rx.
It reduces the interrupt numbers when the uart is going to close
or suspend.

Signed-off-by: Huang Shijie <b32955@xxxxxxxxxxxxx>
---
drivers/tty/serial/imx.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index ed6cdf7..6026101 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -440,6 +440,10 @@ static void imx_stop_rx(struct uart_port *port)

temp = readl(sport->port.membase + UCR2);
writel(temp & ~UCR2_RXEN, sport->port.membase + UCR2);
+
+ /* disable the `Receiver Ready Interrrupt` */
+ temp = readl(sport->port.membase + UCR1);
+ writel(temp & ~UCR1_RRDYEN, sport->port.membase + UCR1);

Will this change cause a loss or a processing delay of RX characters pending in the RX FIFO ?

It is not clear whether disabling the receiver will clear the RX FIFO. My guess is that the contents of the RX FIFO will remain intact when the receiver is disabled. The RX interrupt has an opportunity to mop up these pending characters in the RX FIFO but disabling the RX interrupt has potential to leave those characters in the RX FIFO. Does it matter ?

Thanks

Dirk

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/