]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
carma-fpga: pass correct flags to ->device_prep_dma_memcpy()
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 5 Nov 2012 10:00:15 +0000 (10:00 +0000)
committerDan Williams <djbw@fb.com>
Sat, 17 Nov 2012 02:04:09 +0000 (18:04 -0800)
DMA unmapping is handled by a driver so tell fsldma.c driver
(which is the DMA engine driver used by carma-fpga) to skip
unmapping destination and source buffers.

Cc: Ira W. Snyder <iws@ovro.caltech.edu>
Cc: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dan Williams <djbw@fb.com>
drivers/misc/carma/carma-fpga.c

index 8835eabb3b8730d45d4deffb533bb6bf5ff332c4..6b43f8c7b3beed7a4afb1a4d7686a5f14b3f0289 100644 (file)
@@ -631,6 +631,8 @@ static int data_submit_dma(struct fpga_device *priv, struct data_buf *buf)
        struct dma_async_tx_descriptor *tx;
        dma_cookie_t cookie;
        dma_addr_t dst, src;
+       unsigned long dma_flags = DMA_COMPL_SKIP_DEST_UNMAP |
+                                 DMA_COMPL_SKIP_SRC_UNMAP;
 
        dst_sg = buf->vb.sglist;
        dst_nents = buf->vb.sglen;
@@ -666,7 +668,7 @@ static int data_submit_dma(struct fpga_device *priv, struct data_buf *buf)
        src = SYS_FPGA_BLOCK;
        tx = chan->device->device_prep_dma_memcpy(chan, dst, src,
                                                  REG_BLOCK_SIZE,
-                                                 0);
+                                                 dma_flags);
        if (!tx) {
                dev_err(priv->dev, "unable to prep SYS-FPGA DMA\n");
                return -ENOMEM;