summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/imx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/imx.c')
-rw-r--r--drivers/tty/serial/imx.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 7b5541695308..ee90d117df57 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1281,13 +1281,6 @@ 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;
@@ -2241,6 +2234,18 @@ static int serial_imx_probe(struct platform_device *pdev)
clk_disable_unprepare(sport->clk_ipg);
+ /* if DTE mode is requested, make sure DTE mode is selected
+ and then disable DCDDELT/RIDELT interrupts */
+ if (!is_imx1_uart(sport) && sport->dte_mode) {
+ unsigned long temp;
+ temp = readl(sport->port.membase + UFCR);
+ temp |= UFCR_DCEDTE;
+ writel(temp, sport->port.membase + UFCR);
+ temp = readl(sport->port.membase + UCR3);
+ temp &= ~(UCR3_DCD | UCR3_RI);
+ writel(temp, sport->port.membase + UCR3);
+ }
+
/*
* Allocate the IRQ(s) i.MX1 has three interrupts whereas later
* chips only have one interrupt.