diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-29 09:18:15 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-29 09:18:15 +0300 |
commit | aa668632ae8c25ffc2d94c865af099cca15944b4 (patch) | |
tree | f490dfa51fff3f1cd3b7de1ba4783d0abf37172b /drivers/tty/serial/imx.c | |
parent | d087e7a991f1f61ee2c07db1be7c5cc2aa373f5d (diff) | |
parent | 5ed02dbb497422bf225783f46e6eadd237d23d6b (diff) | |
download | linux-aa668632ae8c25ffc2d94c865af099cca15944b4.tar.xz |
Merge 4.12-rc3 into tty-next
We need the tty fixes/changes here to handle future work.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/imx.c')
-rw-r--r-- | drivers/tty/serial/imx.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 64e16b37ebdb..92606b1e55bd 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -2168,7 +2168,9 @@ static int serial_imx_probe(struct platform_device *pdev) * and DCD (when they are outputs) or enables the respective * irqs. So set this bit early, i.e. before requesting irqs. */ - writel(UFCR_DCEDTE, sport->port.membase + UFCR); + reg = readl(sport->port.membase + UFCR); + if (!(reg & UFCR_DCEDTE)) + writel(reg | UFCR_DCEDTE, sport->port.membase + UFCR); /* * Disable UCR3_RI and UCR3_DCD irqs. They are also not @@ -2179,7 +2181,15 @@ static int serial_imx_probe(struct platform_device *pdev) sport->port.membase + UCR3); } else { - writel(0, sport->port.membase + UFCR); + unsigned long ucr3 = UCR3_DSR; + + reg = readl(sport->port.membase + UFCR); + if (reg & UFCR_DCEDTE) + writel(reg & ~UFCR_DCEDTE, sport->port.membase + UFCR); + + if (!is_imx1_uart(sport)) + ucr3 |= IMX21_UCR3_RXDMUXSEL | UCR3_ADNIMP; + writel(ucr3, sport->port.membase + UCR3); } clk_disable_unprepare(sport->clk_ipg); |