dmaengine: ioatdma: move dma prep functions to single location
authorDave Jiang <dave.jiang@intel.com>
Tue, 11 Aug 2015 15:48:49 +0000 (08:48 -0700)
committerVinod Koul <vinod.koul@intel.com>
Mon, 17 Aug 2015 08:07:30 +0000 (13:37 +0530)
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>
drivers/dma/ioat/Makefile
drivers/dma/ioat/dma.c
drivers/dma/ioat/dma.h
drivers/dma/ioat/dma_v3.c
drivers/dma/ioat/init.c
drivers/dma/ioat/prep.c [new file with mode: 0644]

index f785f8f..3a7e664 100644 (file)
@@ -1,2 +1,2 @@
 obj-$(CONFIG_INTEL_IOATDMA) += ioatdma.o
-ioatdma-y := init.o dma.o dma_v3.o dca.o sysfs.o
+ioatdma-y := init.o dma.o dma_v3.o prep.o dca.o sysfs.o
index 5d78caf..e67eda0 100644 (file)
@@ -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;
-}
Simple merge
Simple merge
Simple merge
Simple merge