serial: omap8250: Drop rx buffer sync
authorPeter Hurley <peter@hurleysoftware.com>
Sun, 10 Apr 2016 05:14:34 +0000 (22:14 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Apr 2016 16:26:55 +0000 (09:26 -0700)
commit 27c310c5c312 ("serial: 8250_dma: no need to sync RX buffer")
notes the RX DMA buffer is allocated from DMA coherent memory, and
thus does not need sync'd for each transaction. The same is true
for OMAP RX DMA.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_omap.c

index abeaf5eb12759f973f09d9c10774c6f2f0c4a954..ca2a85011916ec3fb5713d64066b6fd7a1b6c584 100644 (file)
@@ -754,9 +754,6 @@ static void __dma_rx_do_complete(struct uart_8250_port *p, bool error)
        unsigned long           flags;
        int                     ret;
 
-       dma_sync_single_for_cpu(dma->rxchan->device->dev, dma->rx_addr,
-                               dma->rx_size, DMA_FROM_DEVICE);
-
        spin_lock_irqsave(&priv->rx_dma_lock, flags);
 
        if (!dma->rx_running)
@@ -868,9 +865,6 @@ static int omap_8250_rx_dma(struct uart_8250_port *p, unsigned int iir)
 
        dma->rx_cookie = dmaengine_submit(desc);
 
-       dma_sync_single_for_device(dma->rxchan->device->dev, dma->rx_addr,
-                                  dma->rx_size, DMA_FROM_DEVICE);
-
        dma_async_issue_pending(dma->rxchan);
 out:
        spin_unlock_irqrestore(&priv->rx_dma_lock, flags);