Lines Matching refs:dma_chan
33 static void mv_xor_issue_pending(struct dma_chan *chan);
462 static int mv_xor_alloc_chan_resources(struct dma_chan *chan) in mv_xor_alloc_chan_resources()
511 mv_xor_prep_dma_xor(struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src, in mv_xor_prep_dma_xor()
543 mv_xor_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, in mv_xor_prep_dma_memcpy()
554 mv_xor_prep_dma_interrupt(struct dma_chan *chan, unsigned long flags) in mv_xor_prep_dma_interrupt()
571 static void mv_xor_free_chan_resources(struct dma_chan *chan) in mv_xor_free_chan_resources()
614 static enum dma_status mv_xor_status(struct dma_chan *chan, in mv_xor_status()
687 static void mv_xor_issue_pending(struct dma_chan *chan) in mv_xor_issue_pending()
706 struct dma_chan *dma_chan; in mv_xor_memcpy_self_test() local
726 dma_chan = &mv_chan->dmachan; in mv_xor_memcpy_self_test()
727 if (mv_xor_alloc_chan_resources(dma_chan) < 1) { in mv_xor_memcpy_self_test()
732 unmap = dmaengine_get_unmap_data(dma_chan->device->dev, 2, GFP_KERNEL); in mv_xor_memcpy_self_test()
738 src_dma = dma_map_page(dma_chan->device->dev, virt_to_page(src), 0, in mv_xor_memcpy_self_test()
742 ret = dma_mapping_error(dma_chan->device->dev, src_dma); in mv_xor_memcpy_self_test()
749 dest_dma = dma_map_page(dma_chan->device->dev, virt_to_page(dest), 0, in mv_xor_memcpy_self_test()
753 ret = dma_mapping_error(dma_chan->device->dev, dest_dma); in mv_xor_memcpy_self_test()
761 tx = mv_xor_prep_dma_memcpy(dma_chan, dest_dma, src_dma, in mv_xor_memcpy_self_test()
764 dev_err(dma_chan->device->dev, in mv_xor_memcpy_self_test()
772 dev_err(dma_chan->device->dev, in mv_xor_memcpy_self_test()
778 mv_xor_issue_pending(dma_chan); in mv_xor_memcpy_self_test()
782 if (mv_xor_status(dma_chan, cookie, NULL) != in mv_xor_memcpy_self_test()
784 dev_err(dma_chan->device->dev, in mv_xor_memcpy_self_test()
790 dma_sync_single_for_cpu(dma_chan->device->dev, dest_dma, in mv_xor_memcpy_self_test()
793 dev_err(dma_chan->device->dev, in mv_xor_memcpy_self_test()
801 mv_xor_free_chan_resources(dma_chan); in mv_xor_memcpy_self_test()
819 struct dma_chan *dma_chan; in mv_xor_xor_self_test() local
857 dma_chan = &mv_chan->dmachan; in mv_xor_xor_self_test()
858 if (mv_xor_alloc_chan_resources(dma_chan) < 1) { in mv_xor_xor_self_test()
863 unmap = dmaengine_get_unmap_data(dma_chan->device->dev, src_count + 1, in mv_xor_xor_self_test()
872 unmap->addr[i] = dma_map_page(dma_chan->device->dev, xor_srcs[i], in mv_xor_xor_self_test()
875 ret = dma_mapping_error(dma_chan->device->dev, unmap->addr[i]); in mv_xor_xor_self_test()
883 unmap->addr[src_count] = dma_map_page(dma_chan->device->dev, dest, 0, PAGE_SIZE, in mv_xor_xor_self_test()
886 ret = dma_mapping_error(dma_chan->device->dev, unmap->addr[src_count]); in mv_xor_xor_self_test()
894 tx = mv_xor_prep_dma_xor(dma_chan, dest_dma, dma_srcs, in mv_xor_xor_self_test()
897 dev_err(dma_chan->device->dev, in mv_xor_xor_self_test()
905 dev_err(dma_chan->device->dev, in mv_xor_xor_self_test()
911 mv_xor_issue_pending(dma_chan); in mv_xor_xor_self_test()
915 if (mv_xor_status(dma_chan, cookie, NULL) != in mv_xor_xor_self_test()
917 dev_err(dma_chan->device->dev, in mv_xor_xor_self_test()
923 dma_sync_single_for_cpu(dma_chan->device->dev, dest_dma, in mv_xor_xor_self_test()
928 dev_err(dma_chan->device->dev, in mv_xor_xor_self_test()
938 mv_xor_free_chan_resources(dma_chan); in mv_xor_xor_self_test()
949 struct dma_chan *chan, *_chan; in mv_xor_channel_remove()