Lines Matching refs:desc

122 	struct dma_async_tx_descriptor	desc;  member
156 struct dma_async_tx_descriptor desc; member
224 struct imxdma_desc *desc; in imxdma_chan_is_doing_cyclic() local
227 desc = list_first_entry(&imxdmac->ld_active, struct imxdma_desc, in imxdma_chan_is_doing_cyclic()
229 if (desc->type == IMXDMA_DESC_CYCLIC) in imxdma_chan_is_doing_cyclic()
263 struct imxdma_channel *imxdmac = to_imxdma_chan(d->desc.chan); in imxdma_sg_next()
290 struct imxdma_channel *imxdmac = to_imxdma_chan(d->desc.chan); in imxdma_enable_hw()
411 struct imxdma_desc *desc; in dma_irq_handle_channel() local
420 desc = list_first_entry(&imxdmac->ld_active, in dma_irq_handle_channel()
425 if (desc->sg) { in dma_irq_handle_channel()
427 desc->sg = sg_next(desc->sg); in dma_irq_handle_channel()
429 if (desc->sg) { in dma_irq_handle_channel()
430 imxdma_sg_next(desc); in dma_irq_handle_channel()
493 struct imxdma_channel *imxdmac = to_imxdma_chan(d->desc.chan); in imxdma_xfer_desc()
600 struct imxdma_desc *desc, *next_desc; in imxdma_tasklet() local
610 desc = list_first_entry(&imxdmac->ld_active, struct imxdma_desc, node); in imxdma_tasklet()
619 dma_cookie_complete(&desc->desc); in imxdma_tasklet()
640 dmaengine_desc_get_callback_invoke(&desc->desc, NULL); in imxdma_tasklet()
748 struct imxdma_desc *desc; in imxdma_alloc_chan_resources() local
750 desc = kzalloc(sizeof(*desc), GFP_KERNEL); in imxdma_alloc_chan_resources()
751 if (!desc) in imxdma_alloc_chan_resources()
753 dma_async_tx_descriptor_init(&desc->desc, chan); in imxdma_alloc_chan_resources()
754 desc->desc.tx_submit = imxdma_tx_submit; in imxdma_alloc_chan_resources()
756 desc->desc.flags = DMA_CTRL_ACK; in imxdma_alloc_chan_resources()
757 desc->status = DMA_COMPLETE; in imxdma_alloc_chan_resources()
759 list_add_tail(&desc->node, &imxdmac->ld_free); in imxdma_alloc_chan_resources()
773 struct imxdma_desc *desc, *_desc; in imxdma_free_chan_resources() local
784 list_for_each_entry_safe(desc, _desc, &imxdmac->ld_free, node) { in imxdma_free_chan_resources()
785 kfree(desc); in imxdma_free_chan_resources()
802 struct imxdma_desc *desc; in imxdma_prep_slave_sg() local
808 desc = list_first_entry(&imxdmac->ld_free, struct imxdma_desc, node); in imxdma_prep_slave_sg()
831 desc->type = IMXDMA_DESC_SLAVE_SG; in imxdma_prep_slave_sg()
832 desc->sg = sgl; in imxdma_prep_slave_sg()
833 desc->sgcount = sg_len; in imxdma_prep_slave_sg()
834 desc->len = dma_length; in imxdma_prep_slave_sg()
835 desc->direction = direction; in imxdma_prep_slave_sg()
837 desc->src = imxdmac->per_address; in imxdma_prep_slave_sg()
839 desc->dest = imxdmac->per_address; in imxdma_prep_slave_sg()
841 desc->desc.callback = NULL; in imxdma_prep_slave_sg()
842 desc->desc.callback_param = NULL; in imxdma_prep_slave_sg()
844 return &desc->desc; in imxdma_prep_slave_sg()
854 struct imxdma_desc *desc; in imxdma_prep_dma_cyclic() local
865 desc = list_first_entry(&imxdmac->ld_free, struct imxdma_desc, node); in imxdma_prep_dma_cyclic()
887 desc->type = IMXDMA_DESC_CYCLIC; in imxdma_prep_dma_cyclic()
888 desc->sg = imxdmac->sg_list; in imxdma_prep_dma_cyclic()
889 desc->sgcount = periods; in imxdma_prep_dma_cyclic()
890 desc->len = IMX_DMA_LENGTH_LOOP; in imxdma_prep_dma_cyclic()
891 desc->direction = direction; in imxdma_prep_dma_cyclic()
893 desc->src = imxdmac->per_address; in imxdma_prep_dma_cyclic()
895 desc->dest = imxdmac->per_address; in imxdma_prep_dma_cyclic()
897 desc->desc.callback = NULL; in imxdma_prep_dma_cyclic()
898 desc->desc.callback_param = NULL; in imxdma_prep_dma_cyclic()
902 return &desc->desc; in imxdma_prep_dma_cyclic()
911 struct imxdma_desc *desc; in imxdma_prep_dma_memcpy() local
921 desc = list_first_entry(&imxdmac->ld_free, struct imxdma_desc, node); in imxdma_prep_dma_memcpy()
923 desc->type = IMXDMA_DESC_MEMCPY; in imxdma_prep_dma_memcpy()
924 desc->src = src; in imxdma_prep_dma_memcpy()
925 desc->dest = dest; in imxdma_prep_dma_memcpy()
926 desc->len = len; in imxdma_prep_dma_memcpy()
927 desc->direction = DMA_MEM_TO_MEM; in imxdma_prep_dma_memcpy()
928 desc->config_port = IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR; in imxdma_prep_dma_memcpy()
929 desc->config_mem = IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR; in imxdma_prep_dma_memcpy()
930 desc->desc.callback = NULL; in imxdma_prep_dma_memcpy()
931 desc->desc.callback_param = NULL; in imxdma_prep_dma_memcpy()
933 return &desc->desc; in imxdma_prep_dma_memcpy()
942 struct imxdma_desc *desc; in imxdma_prep_dma_interleaved() local
958 desc = list_first_entry(&imxdmac->ld_free, struct imxdma_desc, node); in imxdma_prep_dma_interleaved()
960 desc->type = IMXDMA_DESC_INTERLEAVED; in imxdma_prep_dma_interleaved()
961 desc->src = xt->src_start; in imxdma_prep_dma_interleaved()
962 desc->dest = xt->dst_start; in imxdma_prep_dma_interleaved()
963 desc->x = xt->sgl[0].size; in imxdma_prep_dma_interleaved()
964 desc->y = xt->numf; in imxdma_prep_dma_interleaved()
965 desc->w = xt->sgl[0].icg + desc->x; in imxdma_prep_dma_interleaved()
966 desc->len = desc->x * desc->y; in imxdma_prep_dma_interleaved()
967 desc->direction = DMA_MEM_TO_MEM; in imxdma_prep_dma_interleaved()
968 desc->config_port = IMX_DMA_MEMSIZE_32; in imxdma_prep_dma_interleaved()
969 desc->config_mem = IMX_DMA_MEMSIZE_32; in imxdma_prep_dma_interleaved()
971 desc->config_mem |= IMX_DMA_TYPE_2D; in imxdma_prep_dma_interleaved()
973 desc->config_port |= IMX_DMA_TYPE_2D; in imxdma_prep_dma_interleaved()
974 desc->desc.callback = NULL; in imxdma_prep_dma_interleaved()
975 desc->desc.callback_param = NULL; in imxdma_prep_dma_interleaved()
977 return &desc->desc; in imxdma_prep_dma_interleaved()
984 struct imxdma_desc *desc; in imxdma_issue_pending() local
990 desc = list_first_entry(&imxdmac->ld_queue, in imxdma_issue_pending()
993 if (imxdma_xfer_desc(desc) < 0) { in imxdma_issue_pending()