• H
    serial: imx: check the DMA for imx_tx_empty · 1ce43e58
    Huang Shijie 提交于
    Assume the following situation:
    
      If the DMA is enabled, and the a TX DMA operation is working,
    But we have not issued the TX DMA operation (or we have issued the
    TX DMA operation with dma_async_issue_pending(), but the DMA has not
    started to move the data from the memory to the TXFIFO).
    
    At this time, we may get the wrong status of the transmitter when we
    call the imx_tx_empty. In such situation, only check the USR2_TXDC
    does not enough for us.
    
    This patch checks the DMA's situation, and return 0 when the TX DMA is
    working.
    Signed-off-by: NHuang Shijie <b32955@freescale.com>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    1ce43e58
imx.c 53.5 KB