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-24 01:27:34 +0100 |
commit | 46c0a5fd2d406b74a7e97e914bd71365dd30ef47 (patch) | |
tree | 4873997ff1426015651f11c10edde23b33629bfd | |
parent | 9fd59b6eebd12106b5b53fc56466bcd89b9a7ee9 (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 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. |