diff options
author | Andy Duan <fugang.duan@nxp.com> | 2017-03-21 17:22:20 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:26:02 +0800 |
commit | e22fd1b25fbac0afbd755eb40b20af6f7ac23ef3 (patch) | |
tree | f6a55321f3b7be0ca095b5bb689006e16f931d04 /drivers/tty | |
parent | 52e0aa8a49cf61f6fbaa595d9fadd61a0833403e (diff) |
MLK-11665 tty: serial: imx: move dma init to .startup() function
Kernel upgrade to 4.1.8 from 4.1.4 has one conflict: commit:3cd6a7db4c2c and
commit:4eede03b97bf, and there introduces one issue during the merge. The issue
cause pio mode cannot work.
The patch fix the error that move the dma init function to .startup().
Signed-off-by: Fugang Duan <B38611@freescale.com>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/imx.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 35e76e4ea959..1c981ff6c949 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1292,6 +1292,11 @@ static int imx_startup(struct uart_port *port) while (!(readl(sport->port.membase + UCR2) & UCR2_SRST) && (--i > 0)) udelay(1); + /* Can we enable the DMA support? */ + if (is_imx6q_uart(sport) && !uart_console(port) + && !sport->dma_is_inited) + imx_uart_dma_init(sport); + spin_lock_irqsave(&sport->port.lock, flags); /* @@ -1499,11 +1504,6 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios, } else { imx_port_rts_auto(sport, &ucr2); } - - /* Can we enable the DMA support? */ - if (is_imx6q_uart(sport) && !uart_console(port) - && !sport->dma_is_inited) - imx_uart_dma_init(sport); } else { termios->c_cflag &= ~CRTSCTS; } |