Lines Matching refs:dma_chan
45 static void mv_xor_issue_pending(struct dma_chan *chan);
428 static int mv_xor_alloc_chan_resources(struct dma_chan *chan) in mv_xor_alloc_chan_resources()
548 mv_xor_prep_dma_xor(struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src, in mv_xor_prep_dma_xor()
592 mv_xor_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, in mv_xor_prep_dma_memcpy()
603 mv_xor_prep_dma_interrupt(struct dma_chan *chan, unsigned long flags) in mv_xor_prep_dma_interrupt()
620 static void mv_xor_free_chan_resources(struct dma_chan *chan) in mv_xor_free_chan_resources()
667 static enum dma_status mv_xor_status(struct dma_chan *chan, in mv_xor_status()
740 static void mv_xor_issue_pending(struct dma_chan *chan) in mv_xor_issue_pending()
759 struct dma_chan *dma_chan; in mv_chan_memcpy_self_test() local
779 dma_chan = &mv_chan->dmachan; in mv_chan_memcpy_self_test()
780 if (mv_xor_alloc_chan_resources(dma_chan) < 1) { in mv_chan_memcpy_self_test()
785 unmap = dmaengine_get_unmap_data(dma_chan->device->dev, 2, GFP_KERNEL); in mv_chan_memcpy_self_test()
791 src_dma = dma_map_page(dma_chan->device->dev, virt_to_page(src), in mv_chan_memcpy_self_test()
796 ret = dma_mapping_error(dma_chan->device->dev, src_dma); in mv_chan_memcpy_self_test()
803 dest_dma = dma_map_page(dma_chan->device->dev, virt_to_page(dest), in mv_chan_memcpy_self_test()
808 ret = dma_mapping_error(dma_chan->device->dev, dest_dma); in mv_chan_memcpy_self_test()
816 tx = mv_xor_prep_dma_memcpy(dma_chan, dest_dma, src_dma, in mv_chan_memcpy_self_test()
819 dev_err(dma_chan->device->dev, in mv_chan_memcpy_self_test()
827 dev_err(dma_chan->device->dev, in mv_chan_memcpy_self_test()
833 mv_xor_issue_pending(dma_chan); in mv_chan_memcpy_self_test()
837 if (mv_xor_status(dma_chan, cookie, NULL) != in mv_chan_memcpy_self_test()
839 dev_err(dma_chan->device->dev, in mv_chan_memcpy_self_test()
845 dma_sync_single_for_cpu(dma_chan->device->dev, dest_dma, in mv_chan_memcpy_self_test()
848 dev_err(dma_chan->device->dev, in mv_chan_memcpy_self_test()
856 mv_xor_free_chan_resources(dma_chan); in mv_chan_memcpy_self_test()
874 struct dma_chan *dma_chan; in mv_chan_xor_self_test() local
912 dma_chan = &mv_chan->dmachan; in mv_chan_xor_self_test()
913 if (mv_xor_alloc_chan_resources(dma_chan) < 1) { in mv_chan_xor_self_test()
918 unmap = dmaengine_get_unmap_data(dma_chan->device->dev, src_count + 1, in mv_chan_xor_self_test()
927 unmap->addr[i] = dma_map_page(dma_chan->device->dev, xor_srcs[i], in mv_chan_xor_self_test()
930 ret = dma_mapping_error(dma_chan->device->dev, unmap->addr[i]); in mv_chan_xor_self_test()
938 unmap->addr[src_count] = dma_map_page(dma_chan->device->dev, dest, 0, PAGE_SIZE, in mv_chan_xor_self_test()
941 ret = dma_mapping_error(dma_chan->device->dev, unmap->addr[src_count]); in mv_chan_xor_self_test()
949 tx = mv_xor_prep_dma_xor(dma_chan, dest_dma, dma_srcs, in mv_chan_xor_self_test()
952 dev_err(dma_chan->device->dev, in mv_chan_xor_self_test()
960 dev_err(dma_chan->device->dev, in mv_chan_xor_self_test()
966 mv_xor_issue_pending(dma_chan); in mv_chan_xor_self_test()
970 if (mv_xor_status(dma_chan, cookie, NULL) != in mv_chan_xor_self_test()
972 dev_err(dma_chan->device->dev, in mv_chan_xor_self_test()
978 dma_sync_single_for_cpu(dma_chan->device->dev, dest_dma, in mv_chan_xor_self_test()
983 dev_err(dma_chan->device->dev, in mv_chan_xor_self_test()
993 mv_xor_free_chan_resources(dma_chan); in mv_chan_xor_self_test()
1004 struct dma_chan *chan, *_chan; in mv_xor_channel_remove()