serial: mxs-auart: disable the Receive Timeout Interrupt when DMA is enabled
authorHuang Shijie <b32955@freescale.com>
Thu, 22 Nov 2012 07:06:29 +0000 (15:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 23:38:44 +0000 (15:38 -0800)
commita5919442bc61846e36011671df0d67c72275337e
treeba42eed1b2186710c28b5dd71efb389c396a24eb
parent273a4b8a58840773730e0134fe1af11d399cb7a0
serial: mxs-auart: disable the Receive Timeout Interrupt when DMA is enabled

When the DMA is enabled, the Receive Timeout interrupt is very easy to be arised
in the 3M baud rate.  The interrupt handler (aka mxs_auart_irq_handle) will call
mxs_auart_rx_chars() to handle the received data. This is not right, we can not
get the correct data from the RXFIFO now, the data have been moved to the
DMA buffer by the DMA engine.

This patch
  (1) disables the Receive Timeout Interrupt when the DMA is enabled,
  (2) and invoke the mxs_auart_rx_chars() only when the DMA is not enabled.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Tested-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/mxs-auart.c