Lines Matching refs:dma_chan
37 static void mv_xor_issue_pending(struct dma_chan *chan);
466 static int mv_xor_alloc_chan_resources(struct dma_chan *chan) in mv_xor_alloc_chan_resources()
515 mv_xor_prep_dma_xor(struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src, in mv_xor_prep_dma_xor()
547 mv_xor_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, in mv_xor_prep_dma_memcpy()
558 mv_xor_prep_dma_interrupt(struct dma_chan *chan, unsigned long flags) in mv_xor_prep_dma_interrupt()
575 static void mv_xor_free_chan_resources(struct dma_chan *chan) in mv_xor_free_chan_resources()
618 static enum dma_status mv_xor_status(struct dma_chan *chan, in mv_xor_status()
691 static void mv_xor_issue_pending(struct dma_chan *chan) in mv_xor_issue_pending()
710 struct dma_chan *dma_chan; in mv_xor_memcpy_self_test() local
730 dma_chan = &mv_chan->dmachan; in mv_xor_memcpy_self_test()
731 if (mv_xor_alloc_chan_resources(dma_chan) < 1) { in mv_xor_memcpy_self_test()
736 unmap = dmaengine_get_unmap_data(dma_chan->device->dev, 2, GFP_KERNEL); in mv_xor_memcpy_self_test()
742 src_dma = dma_map_page(dma_chan->device->dev, virt_to_page(src), 0, in mv_xor_memcpy_self_test()
746 ret = dma_mapping_error(dma_chan->device->dev, src_dma); in mv_xor_memcpy_self_test()
753 dest_dma = dma_map_page(dma_chan->device->dev, virt_to_page(dest), 0, in mv_xor_memcpy_self_test()
757 ret = dma_mapping_error(dma_chan->device->dev, dest_dma); in mv_xor_memcpy_self_test()
765 tx = mv_xor_prep_dma_memcpy(dma_chan, dest_dma, src_dma, in mv_xor_memcpy_self_test()
768 dev_err(dma_chan->device->dev, in mv_xor_memcpy_self_test()
776 dev_err(dma_chan->device->dev, in mv_xor_memcpy_self_test()
782 mv_xor_issue_pending(dma_chan); in mv_xor_memcpy_self_test()
786 if (mv_xor_status(dma_chan, cookie, NULL) != in mv_xor_memcpy_self_test()
788 dev_err(dma_chan->device->dev, in mv_xor_memcpy_self_test()
794 dma_sync_single_for_cpu(dma_chan->device->dev, dest_dma, in mv_xor_memcpy_self_test()
797 dev_err(dma_chan->device->dev, in mv_xor_memcpy_self_test()
805 mv_xor_free_chan_resources(dma_chan); in mv_xor_memcpy_self_test()
823 struct dma_chan *dma_chan; in mv_xor_xor_self_test() local
861 dma_chan = &mv_chan->dmachan; in mv_xor_xor_self_test()
862 if (mv_xor_alloc_chan_resources(dma_chan) < 1) { in mv_xor_xor_self_test()
867 unmap = dmaengine_get_unmap_data(dma_chan->device->dev, src_count + 1, in mv_xor_xor_self_test()
876 unmap->addr[i] = dma_map_page(dma_chan->device->dev, xor_srcs[i], in mv_xor_xor_self_test()
879 ret = dma_mapping_error(dma_chan->device->dev, unmap->addr[i]); in mv_xor_xor_self_test()
887 unmap->addr[src_count] = dma_map_page(dma_chan->device->dev, dest, 0, PAGE_SIZE, in mv_xor_xor_self_test()
890 ret = dma_mapping_error(dma_chan->device->dev, unmap->addr[src_count]); in mv_xor_xor_self_test()
898 tx = mv_xor_prep_dma_xor(dma_chan, dest_dma, dma_srcs, in mv_xor_xor_self_test()
901 dev_err(dma_chan->device->dev, in mv_xor_xor_self_test()
909 dev_err(dma_chan->device->dev, in mv_xor_xor_self_test()
915 mv_xor_issue_pending(dma_chan); in mv_xor_xor_self_test()
919 if (mv_xor_status(dma_chan, cookie, NULL) != in mv_xor_xor_self_test()
921 dev_err(dma_chan->device->dev, in mv_xor_xor_self_test()
927 dma_sync_single_for_cpu(dma_chan->device->dev, dest_dma, in mv_xor_xor_self_test()
932 dev_err(dma_chan->device->dev, in mv_xor_xor_self_test()
942 mv_xor_free_chan_resources(dma_chan); in mv_xor_xor_self_test()
953 mv_xor_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, in mv_xor_control()
961 struct dma_chan *chan, *_chan; in mv_xor_channel_remove()