diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2018-12-10 00:00:37 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2018-12-21 10:55:37 +0100 |
commit | 6aaed0becad674e072f8e5f071a43c4c9c039504 (patch) | |
tree | ee545da8735dd87fe0fc95420fd8d97b608977da | |
parent | 900913888987e3a22a270c95bd8de8aebdbc1ed7 (diff) |
tty: serial: imx: fix merge inconsistency
Missing commit 688f897ddd96 ("Merge remote-tracking branch
'linux-fslc/4.9-1.0.x-imx' into toradex_4.9-1.0.x-imx-next").
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r-- | drivers/tty/serial/imx.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index b084a823b192..cd37a3a0f387 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1266,13 +1266,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; @@ -2198,6 +2191,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. |