summaryrefslogtreecommitdiff
path: root/drivers/dma/ioat/dma.c
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2015-08-11 18:48:49 +0300
committerVinod Koul <vinod.koul@intel.com>2015-08-17 11:07:30 +0300
commit599d49de7f69cb5a23e913db24e168ba2f09bd05 (patch)
treecce55d57f777b00e12e34f7c96f2e764a15e6547 /drivers/dma/ioat/dma.c
parentc0f28ce66ecfd9fa0ae662a2c7f3e68e537e77f4 (diff)
downloadlinux-599d49de7f69cb5a23e913db24e168ba2f09bd05.tar.xz
dmaengine: ioatdma: move dma prep functions to single location
Move all DMA descriptor prepping functions to prep.c file. Fixup all broken bits caused by the move. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Acked-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/ioat/dma.c')
-rw-r--r--drivers/dma/ioat/dma.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
index 5d78cafdd3f2..e67eda055ea5 100644
--- a/drivers/dma/ioat/dma.c
+++ b/drivers/dma/ioat/dma.c
@@ -578,50 +578,3 @@ int ioat_check_space_lock(struct ioatdma_chan *ioat_chan, int num_descs)
return -ENOMEM;
}
-
-struct dma_async_tx_descriptor *
-ioat_dma_prep_memcpy_lock(struct dma_chan *c, dma_addr_t dma_dest,
- dma_addr_t dma_src, size_t len, unsigned long flags)
-{
- struct ioatdma_chan *ioat_chan = to_ioat_chan(c);
- struct ioat_dma_descriptor *hw;
- struct ioat_ring_ent *desc;
- dma_addr_t dst = dma_dest;
- dma_addr_t src = dma_src;
- size_t total_len = len;
- int num_descs, idx, i;
-
- num_descs = ioat_xferlen_to_descs(ioat_chan, len);
- if (likely(num_descs) &&
- ioat_check_space_lock(ioat_chan, num_descs) == 0)
- idx = ioat_chan->head;
- else
- return NULL;
- i = 0;
- do {
- size_t copy = min_t(size_t, len, 1 << ioat_chan->xfercap_log);
-
- desc = ioat_get_ring_ent(ioat_chan, idx + i);
- hw = desc->hw;
-
- hw->size = copy;
- hw->ctl = 0;
- hw->src_addr = src;
- hw->dst_addr = dst;
-
- len -= copy;
- dst += copy;
- src += copy;
- dump_desc_dbg(ioat_chan, desc);
- } while (++i < num_descs);
-
- desc->txd.flags = flags;
- desc->len = total_len;
- hw->ctl_f.int_en = !!(flags & DMA_PREP_INTERRUPT);
- hw->ctl_f.fence = !!(flags & DMA_PREP_FENCE);
- hw->ctl_f.compl_write = 1;
- dump_desc_dbg(ioat_chan, desc);
- /* we leave the channel locked to ensure in order submission */
-
- return &desc->txd;
-}