Lines Matching refs:desc
54 struct sf_pdma_desc *desc; in sf_pdma_alloc_desc() local
56 desc = kzalloc(sizeof(*desc), GFP_NOWAIT); in sf_pdma_alloc_desc()
57 if (!desc) in sf_pdma_alloc_desc()
60 desc->chan = chan; in sf_pdma_alloc_desc()
62 return desc; in sf_pdma_alloc_desc()
65 static void sf_pdma_fill_desc(struct sf_pdma_desc *desc, in sf_pdma_fill_desc() argument
68 desc->xfer_type = PDMA_FULL_SPEED; in sf_pdma_fill_desc()
69 desc->xfer_size = size; in sf_pdma_fill_desc()
70 desc->dst_addr = dst; in sf_pdma_fill_desc()
71 desc->src_addr = src; in sf_pdma_fill_desc()
86 struct sf_pdma_desc *desc; in sf_pdma_prep_dma_memcpy() local
95 desc = sf_pdma_alloc_desc(chan); in sf_pdma_prep_dma_memcpy()
96 if (!desc) in sf_pdma_prep_dma_memcpy()
99 desc->dirn = DMA_MEM_TO_MEM; in sf_pdma_prep_dma_memcpy()
100 desc->async_tx = vchan_tx_prep(&chan->vchan, &desc->vdesc, flags); in sf_pdma_prep_dma_memcpy()
103 sf_pdma_fill_desc(desc, dest, src, len); in sf_pdma_prep_dma_memcpy()
106 return desc->async_tx; in sf_pdma_prep_dma_memcpy()
145 kfree(chan->desc); in sf_pdma_free_chan_resources()
146 chan->desc = NULL; in sf_pdma_free_chan_resources()
160 struct sf_pdma_desc *desc; in sf_pdma_desc_residue() local
182 desc = to_sf_pdma_desc(vd); in sf_pdma_desc_residue()
183 residue = desc->xfer_size; in sf_pdma_desc_residue()
215 kfree(chan->desc); in sf_pdma_terminate_all()
216 chan->desc = NULL; in sf_pdma_terminate_all()
253 struct sf_pdma_desc *desc = chan->desc; in sf_pdma_xfer_desc() local
256 if (!desc) { in sf_pdma_xfer_desc()
261 writel(desc->xfer_type, regs->xfer_type); in sf_pdma_xfer_desc()
262 writeq(desc->xfer_size, regs->xfer_size); in sf_pdma_xfer_desc()
263 writeq(desc->dst_addr, regs->dst_addr); in sf_pdma_xfer_desc()
264 writeq(desc->src_addr, regs->src_addr); in sf_pdma_xfer_desc()
266 chan->desc = desc; in sf_pdma_xfer_desc()
278 if (!chan->desc && vchan_issue_pending(&chan->vchan)) { in sf_pdma_issue_pending()
280 chan->desc = sf_pdma_get_first_pending_desc(chan); in sf_pdma_issue_pending()
289 struct sf_pdma_desc *desc; in sf_pdma_free_desc() local
291 desc = to_sf_pdma_desc(vdesc); in sf_pdma_free_desc()
292 kfree(desc); in sf_pdma_free_desc()
309 list_del(&chan->desc->vdesc.node); in sf_pdma_donebh_tasklet()
310 vchan_cookie_complete(&chan->desc->vdesc); in sf_pdma_donebh_tasklet()
312 chan->desc = sf_pdma_get_first_pending_desc(chan); in sf_pdma_donebh_tasklet()
313 if (chan->desc) in sf_pdma_donebh_tasklet()
322 struct sf_pdma_desc *desc = chan->desc; in sf_pdma_errbh_tasklet() local
329 dmaengine_desc_get_callback_invoke(desc->async_tx, NULL); in sf_pdma_errbh_tasklet()
355 struct sf_pdma_desc *desc = chan->desc; in sf_pdma_done_isr() local
357 desc->src_addr += desc->xfer_size - residue; in sf_pdma_done_isr()
358 desc->dst_addr += desc->xfer_size - residue; in sf_pdma_done_isr()
359 desc->xfer_size = residue; in sf_pdma_done_isr()