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()
145 llstat = hidma_ll_status(mdma->lldev, mdesc->tre_ch); in hidma_process_completed()
151 list_move(&mdesc->node, &mchan->free); in hidma_process_completed()
172 struct hidma_desc *mdesc = data; in hidma_callback() local
173 struct hidma_chan *mchan = to_hidma_chan(mdesc->desc.chan); in hidma_callback()
180 if (mdesc->node.next) { in hidma_callback()
182 list_move_tail(&mdesc->node, &mchan->completed); in hidma_callback()
320 struct hidma_desc *mdesc; in hidma_tx_submit() local
333 mdesc = container_of(txd, struct hidma_desc, desc); in hidma_tx_submit()
337 list_move_tail(&mdesc->node, &mchan->queued); in hidma_tx_submit()
351 struct hidma_desc *mdesc, *tmp; in hidma_alloc_chan_resources() local
362 mdesc = kzalloc(sizeof(struct hidma_desc), GFP_NOWAIT); in hidma_alloc_chan_resources()
363 if (!mdesc) { in hidma_alloc_chan_resources()
367 dma_async_tx_descriptor_init(&mdesc->desc, dmach); in hidma_alloc_chan_resources()
368 mdesc->desc.tx_submit = hidma_tx_submit; in hidma_alloc_chan_resources()
371 "DMA engine", hidma_callback, mdesc, in hidma_alloc_chan_resources()
372 &mdesc->tre_ch); in hidma_alloc_chan_resources()
376 kfree(mdesc); in hidma_alloc_chan_resources()
379 list_add_tail(&mdesc->node, &descs); in hidma_alloc_chan_resources()
384 list_for_each_entry_safe(mdesc, tmp, &descs, node) { in hidma_alloc_chan_resources()
385 hidma_ll_free(dmadev->lldev, mdesc->tre_ch); in hidma_alloc_chan_resources()
386 kfree(mdesc); in hidma_alloc_chan_resources()
403 struct hidma_desc *mdesc = NULL; in hidma_prep_dma_memcpy() local
410 mdesc = list_first_entry(&mchan->free, struct hidma_desc, node); in hidma_prep_dma_memcpy()
411 list_del(&mdesc->node); in hidma_prep_dma_memcpy()
415 if (!mdesc) in hidma_prep_dma_memcpy()
418 hidma_ll_set_transfer_params(mdma->lldev, mdesc->tre_ch, in hidma_prep_dma_memcpy()
424 list_add_tail(&mdesc->node, &mchan->prepared); in hidma_prep_dma_memcpy()
427 return &mdesc->desc; in hidma_prep_dma_memcpy()
435 struct hidma_desc *mdesc = NULL; in hidma_prep_dma_memset() local
442 mdesc = list_first_entry(&mchan->free, struct hidma_desc, node); in hidma_prep_dma_memset()
443 list_del(&mdesc->node); in hidma_prep_dma_memset()
447 if (!mdesc) in hidma_prep_dma_memset()
450 hidma_ll_set_transfer_params(mdma->lldev, mdesc->tre_ch, in hidma_prep_dma_memset()
456 list_add_tail(&mdesc->node, &mchan->prepared); in hidma_prep_dma_memset()
459 return &mdesc->desc; in hidma_prep_dma_memset()
466 struct hidma_desc *tmp, *mdesc; in hidma_terminate_channel() local
491 list_for_each_entry_safe(mdesc, tmp, &list, node) { in hidma_terminate_channel()
492 struct dma_async_tx_descriptor *txd = &mdesc->desc; in hidma_terminate_channel()
499 list_move(&mdesc->node, &mchan->free); in hidma_terminate_channel()
531 struct hidma_desc *mdesc, *tmp; in hidma_free_chan_resources() local
544 list_for_each_entry_safe(mdesc, tmp, &descs, node) { in hidma_free_chan_resources()
545 hidma_ll_free(mdma->lldev, mdesc->tre_ch); in hidma_free_chan_resources()
546 list_del(&mdesc->node); in hidma_free_chan_resources()
547 kfree(mdesc); in hidma_free_chan_resources()