Lines Matching refs:mdesc
114 struct hidma_desc *mdesc; in hidma_process_completed() local
127 list_for_each_entry_safe(mdesc, next, &list, node) { in hidma_process_completed()
132 desc = &mdesc->desc; in hidma_process_completed()
135 llstat = hidma_ll_status(mdma->lldev, mdesc->tre_ch); in hidma_process_completed()
153 list_move(&mdesc->node, &mchan->free); in hidma_process_completed()
167 struct hidma_desc *mdesc = data; in hidma_callback() local
168 struct hidma_chan *mchan = to_hidma_chan(mdesc->desc.chan); in hidma_callback()
175 if (mdesc->node.next) { in hidma_callback()
177 list_move_tail(&mdesc->node, &mchan->completed); in hidma_callback()
315 struct hidma_desc *mdesc; in hidma_tx_submit() local
328 mdesc = container_of(txd, struct hidma_desc, desc); in hidma_tx_submit()
332 list_move_tail(&mdesc->node, &mchan->queued); in hidma_tx_submit()
346 struct hidma_desc *mdesc, *tmp; in hidma_alloc_chan_resources() local
357 mdesc = kzalloc(sizeof(struct hidma_desc), GFP_NOWAIT); in hidma_alloc_chan_resources()
358 if (!mdesc) { in hidma_alloc_chan_resources()
362 dma_async_tx_descriptor_init(&mdesc->desc, dmach); in hidma_alloc_chan_resources()
363 mdesc->desc.tx_submit = hidma_tx_submit; in hidma_alloc_chan_resources()
366 "DMA engine", hidma_callback, mdesc, in hidma_alloc_chan_resources()
367 &mdesc->tre_ch); in hidma_alloc_chan_resources()
371 kfree(mdesc); in hidma_alloc_chan_resources()
374 list_add_tail(&mdesc->node, &descs); in hidma_alloc_chan_resources()
379 list_for_each_entry_safe(mdesc, tmp, &descs, node) { in hidma_alloc_chan_resources()
380 hidma_ll_free(dmadev->lldev, mdesc->tre_ch); in hidma_alloc_chan_resources()
381 kfree(mdesc); in hidma_alloc_chan_resources()
398 struct hidma_desc *mdesc = NULL; in hidma_prep_dma_memcpy() local
405 mdesc = list_first_entry(&mchan->free, struct hidma_desc, node); in hidma_prep_dma_memcpy()
406 list_del(&mdesc->node); in hidma_prep_dma_memcpy()
410 if (!mdesc) in hidma_prep_dma_memcpy()
413 mdesc->desc.flags = flags; in hidma_prep_dma_memcpy()
414 hidma_ll_set_transfer_params(mdma->lldev, mdesc->tre_ch, in hidma_prep_dma_memcpy()
420 list_add_tail(&mdesc->node, &mchan->prepared); in hidma_prep_dma_memcpy()
423 return &mdesc->desc; in hidma_prep_dma_memcpy()
431 struct hidma_desc *mdesc = NULL; in hidma_prep_dma_memset() local
439 mdesc = list_first_entry(&mchan->free, struct hidma_desc, node); in hidma_prep_dma_memset()
440 list_del(&mdesc->node); in hidma_prep_dma_memset()
444 if (!mdesc) in hidma_prep_dma_memset()
457 mdesc->desc.flags = flags; in hidma_prep_dma_memset()
458 hidma_ll_set_transfer_params(mdma->lldev, mdesc->tre_ch, in hidma_prep_dma_memset()
464 list_add_tail(&mdesc->node, &mchan->prepared); in hidma_prep_dma_memset()
467 return &mdesc->desc; in hidma_prep_dma_memset()
474 struct hidma_desc *tmp, *mdesc; in hidma_terminate_channel() local
499 list_for_each_entry_safe(mdesc, tmp, &list, node) { in hidma_terminate_channel()
500 struct dma_async_tx_descriptor *txd = &mdesc->desc; in hidma_terminate_channel()
507 list_move(&mdesc->node, &mchan->free); in hidma_terminate_channel()
539 struct hidma_desc *mdesc, *tmp; in hidma_free_chan_resources() local
552 list_for_each_entry_safe(mdesc, tmp, &descs, node) { in hidma_free_chan_resources()
553 hidma_ll_free(mdma->lldev, mdesc->tre_ch); in hidma_free_chan_resources()
554 list_del(&mdesc->node); in hidma_free_chan_resources()
555 kfree(mdesc); in hidma_free_chan_resources()