diff options
author | Fugang Duan <fugang.duan@nxp.com> | 2017-08-14 17:46:11 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:28:03 +0800 |
commit | 5b44901747d09904b1f2780a95bca709d0cf9645 (patch) | |
tree | 93c5ed50d4cf7f76319dc320066d29daa7f70e89 /drivers/tty/serial/fsl_lpuart.c | |
parent | 91e3034c7bbe26129ed11573183b605193baf40a (diff) |
MLK-16199 tty: serial: lpuart: don't clear idle flag in eeop mode
In DMA EEOP mode idle flag can trigger DMA major loop stop. The idle
flag should be cleared by HW. So others cannot clear idle flag in the
mode enabled.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Pandy Gao <pandy.gao@nxp.com>
Diffstat (limited to 'drivers/tty/serial/fsl_lpuart.c')
-rw-r--r-- | drivers/tty/serial/fsl_lpuart.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index fb57e574c042..b7ab35247df4 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -959,7 +959,9 @@ static irqreturn_t lpuart32_int(int irq, void *dev_id) lpuart32_rxint(irq, dev_id); else if (sport->lpuart_dma_rx_use && sport->dma_rx_chan_active) lpuart_prepare_rx(sport); - } else if (!(crdma & UARTBAUD_RDMAE) && (sts & UARTSTAT_IDLE)) { + } else if (!(crdma & UARTBAUD_RDMAE) && (sts & UARTSTAT_IDLE) && + !(sport->lpuart_dma_rx_use && sport->dma_eeop && + rxcount > 0)) { lpuart32_write(&sport->port, UARTSTAT_IDLE, UARTSTAT); } @@ -1585,6 +1587,10 @@ static void lpuart32_shutdown(struct uart_port *port) spin_lock_irqsave(&port->lock, flags); + /* clear statue */ + temp = lpuart32_read(&sport->port, UARTSTAT); + lpuart32_write(&sport->port, temp, UARTSTAT); + /* disable Rx/Tx DMA */ temp = lpuart32_read(port, UARTBAUD); temp &= ~(UARTBAUD_TDMAE | UARTBAUD_RDMAE | UARTBAUD_RIDMAE); |