Lines Matching refs:mdesc

120 	struct hidma_desc *mdesc;  in hidma_process_completed()  local
133 list_for_each_entry_safe(mdesc, next, &list, node) { in hidma_process_completed()
138 desc = &mdesc->desc; in hidma_process_completed()
141 llstat = hidma_ll_status(mdma->lldev, mdesc->tre_ch); in hidma_process_completed()
159 list_move(&mdesc->node, &mchan->free); in hidma_process_completed()
173 struct hidma_desc *mdesc = data; in hidma_callback() local
174 struct hidma_chan *mchan = to_hidma_chan(mdesc->desc.chan); in hidma_callback()
181 if (mdesc->node.next) { in hidma_callback()
183 list_move_tail(&mdesc->node, &mchan->completed); in hidma_callback()
321 struct hidma_desc *mdesc; in hidma_tx_submit() local
334 mdesc = container_of(txd, struct hidma_desc, desc); in hidma_tx_submit()
338 list_move_tail(&mdesc->node, &mchan->queued); in hidma_tx_submit()
352 struct hidma_desc *mdesc, *tmp; in hidma_alloc_chan_resources() local
363 mdesc = kzalloc(sizeof(struct hidma_desc), GFP_NOWAIT); in hidma_alloc_chan_resources()
364 if (!mdesc) { in hidma_alloc_chan_resources()
368 dma_async_tx_descriptor_init(&mdesc->desc, dmach); in hidma_alloc_chan_resources()
369 mdesc->desc.tx_submit = hidma_tx_submit; in hidma_alloc_chan_resources()
372 "DMA engine", hidma_callback, mdesc, in hidma_alloc_chan_resources()
373 &mdesc->tre_ch); in hidma_alloc_chan_resources()
377 kfree(mdesc); in hidma_alloc_chan_resources()
380 list_add_tail(&mdesc->node, &descs); in hidma_alloc_chan_resources()
385 list_for_each_entry_safe(mdesc, tmp, &descs, node) { in hidma_alloc_chan_resources()
386 hidma_ll_free(dmadev->lldev, mdesc->tre_ch); in hidma_alloc_chan_resources()
387 kfree(mdesc); in hidma_alloc_chan_resources()
404 struct hidma_desc *mdesc = NULL; in hidma_prep_dma_memcpy() local
411 mdesc = list_first_entry(&mchan->free, struct hidma_desc, node); in hidma_prep_dma_memcpy()
412 list_del(&mdesc->node); in hidma_prep_dma_memcpy()
416 if (!mdesc) in hidma_prep_dma_memcpy()
419 mdesc->desc.flags = flags; in hidma_prep_dma_memcpy()
420 hidma_ll_set_transfer_params(mdma->lldev, mdesc->tre_ch, in hidma_prep_dma_memcpy()
426 list_add_tail(&mdesc->node, &mchan->prepared); in hidma_prep_dma_memcpy()
429 return &mdesc->desc; in hidma_prep_dma_memcpy()
437 struct hidma_desc *mdesc = NULL; in hidma_prep_dma_memset() local
444 mdesc = list_first_entry(&mchan->free, struct hidma_desc, node); in hidma_prep_dma_memset()
445 list_del(&mdesc->node); in hidma_prep_dma_memset()
449 if (!mdesc) in hidma_prep_dma_memset()
452 mdesc->desc.flags = flags; in hidma_prep_dma_memset()
453 hidma_ll_set_transfer_params(mdma->lldev, mdesc->tre_ch, in hidma_prep_dma_memset()
459 list_add_tail(&mdesc->node, &mchan->prepared); in hidma_prep_dma_memset()
462 return &mdesc->desc; in hidma_prep_dma_memset()
469 struct hidma_desc *tmp, *mdesc; in hidma_terminate_channel() local
494 list_for_each_entry_safe(mdesc, tmp, &list, node) { in hidma_terminate_channel()
495 struct dma_async_tx_descriptor *txd = &mdesc->desc; in hidma_terminate_channel()
502 list_move(&mdesc->node, &mchan->free); in hidma_terminate_channel()
534 struct hidma_desc *mdesc, *tmp; in hidma_free_chan_resources() local
547 list_for_each_entry_safe(mdesc, tmp, &descs, node) { in hidma_free_chan_resources()
548 hidma_ll_free(mdma->lldev, mdesc->tre_ch); in hidma_free_chan_resources()
549 list_del(&mdesc->node); in hidma_free_chan_resources()
550 kfree(mdesc); in hidma_free_chan_resources()