diff options
Diffstat (limited to 'drivers/tty/serial/imx.c')
-rw-r--r-- | drivers/tty/serial/imx.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 2c90dc31bfaa..54fdc7866ea1 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
@@ -1121,11 +1121,6 @@ static int imx_startup(struct uart_port *port) | |||
1121 | 1121 | ||
1122 | writel(temp & ~UCR4_DREN, sport->port.membase + UCR4); | 1122 | writel(temp & ~UCR4_DREN, sport->port.membase + UCR4); |
1123 | 1123 | ||
1124 | /* Can we enable the DMA support? */ | ||
1125 | if (is_imx6q_uart(sport) && !uart_console(port) && | ||
1126 | !sport->dma_is_inited) | ||
1127 | imx_uart_dma_init(sport); | ||
1128 | |||
1129 | spin_lock_irqsave(&sport->port.lock, flags); | 1124 | spin_lock_irqsave(&sport->port.lock, flags); |
1130 | /* Reset fifo's and state machines */ | 1125 | /* Reset fifo's and state machines */ |
1131 | i = 100; | 1126 | i = 100; |
@@ -1143,9 +1138,6 @@ static int imx_startup(struct uart_port *port) | |||
1143 | writel(USR1_RTSD, sport->port.membase + USR1); | 1138 | writel(USR1_RTSD, sport->port.membase + USR1); |
1144 | writel(USR2_ORE, sport->port.membase + USR2); | 1139 | writel(USR2_ORE, sport->port.membase + USR2); |
1145 | 1140 | ||
1146 | if (sport->dma_is_inited && !sport->dma_is_enabled) | ||
1147 | imx_enable_dma(sport); | ||
1148 | |||
1149 | temp = readl(sport->port.membase + UCR1); | 1141 | temp = readl(sport->port.membase + UCR1); |
1150 | temp |= UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN; | 1142 | temp |= UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN; |
1151 | 1143 | ||
@@ -1316,6 +1308,11 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios, | |||
1316 | } else { | 1308 | } else { |
1317 | ucr2 |= UCR2_CTSC; | 1309 | ucr2 |= UCR2_CTSC; |
1318 | } | 1310 | } |
1311 | |||
1312 | /* Can we enable the DMA support? */ | ||
1313 | if (is_imx6q_uart(sport) && !uart_console(port) | ||
1314 | && !sport->dma_is_inited) | ||
1315 | imx_uart_dma_init(sport); | ||
1319 | } else { | 1316 | } else { |
1320 | termios->c_cflag &= ~CRTSCTS; | 1317 | termios->c_cflag &= ~CRTSCTS; |
1321 | } | 1318 | } |
@@ -1432,6 +1429,8 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios, | |||
1432 | if (UART_ENABLE_MS(&sport->port, termios->c_cflag)) | 1429 | if (UART_ENABLE_MS(&sport->port, termios->c_cflag)) |
1433 | imx_enable_ms(&sport->port); | 1430 | imx_enable_ms(&sport->port); |
1434 | 1431 | ||
1432 | if (sport->dma_is_inited && !sport->dma_is_enabled) | ||
1433 | imx_enable_dma(sport); | ||
1435 | spin_unlock_irqrestore(&sport->port.lock, flags); | 1434 | spin_unlock_irqrestore(&sport->port.lock, flags); |
1436 | } | 1435 | } |
1437 | 1436 | ||