From 0047e84e49fa59040939c8ba7d0889afcd5f2b6d Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 22 Jan 2016 15:33:21 -0800 Subject: tty: serial: imx: disable DCD and RI interrupts If the UART is in DTE mode, the signals DCD and RI are inputs. In this case, the control bits in UCR3_DCD and UCR3_RI control the interrupt of those two inputs. The two bits are 1 on reset, hence leading to an interrupt if one of those signal changes... However, as of now the interrupt handler does not handle these interrupts, leading to a interrupt strom. Solve the issue by explicitly disabling the two interrupts during initialization. Signed-off-by: Stefan Agner Acked-by: Max Krummenacher --- drivers/tty/serial/imx.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index d557f1efb405..30542c2875e9 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1170,6 +1170,13 @@ static int imx_startup(struct uart_port *port) writel(temp & ~UCR4_DREN, sport->port.membase + UCR4); + /* Disable DCDDELT/RIDELT interrupts */ + if (!is_imx1_uart(sport) && sport->dte_mode) { + temp = readl(sport->port.membase + UCR3); + temp &= ~(UCR3_DCD | UCR3_RI); + writel(temp, sport->port.membase + UCR3); + } + /* Reset fifo's and state machines */ i = 100; -- cgit v1.2.3