Lines Matching refs:pdesc

114 	struct mxs_dma_desc *pdesc;  in mxs_dma_enable()  local
128 pdesc = list_first_entry(&pchan->active, struct mxs_dma_desc, node); in mxs_dma_enable()
129 if (pdesc == NULL) in mxs_dma_enable()
133 if (!(pdesc->cmd.data & MXS_DMA_DESC_CHAIN)) in mxs_dma_enable()
141 pdesc = list_entry(pdesc->node.next, in mxs_dma_enable()
143 writel(mxs_dma_cmd_address(pdesc), in mxs_dma_enable()
153 writel(mxs_dma_cmd_address(pdesc), in mxs_dma_enable()
340 struct mxs_dma_desc *pdesc; in mxs_dma_desc_alloc() local
344 pdesc = memalign(MXS_DMA_ALIGNMENT, size); in mxs_dma_desc_alloc()
346 if (pdesc == NULL) in mxs_dma_desc_alloc()
349 memset(pdesc, 0, sizeof(*pdesc)); in mxs_dma_desc_alloc()
350 pdesc->address = (dma_addr_t)pdesc; in mxs_dma_desc_alloc()
352 return pdesc; in mxs_dma_desc_alloc()
358 void mxs_dma_desc_free(struct mxs_dma_desc *pdesc) in mxs_dma_desc_free() argument
360 if (pdesc == NULL) in mxs_dma_desc_free()
363 free(pdesc); in mxs_dma_desc_free()
405 int mxs_dma_desc_append(int channel, struct mxs_dma_desc *pdesc) in mxs_dma_desc_append() argument
417 pdesc->cmd.next = mxs_dma_cmd_address(pdesc); in mxs_dma_desc_append()
418 pdesc->flags |= MXS_DMA_DESC_FIRST | MXS_DMA_DESC_LAST; in mxs_dma_desc_append()
424 pdesc->flags &= ~MXS_DMA_DESC_FIRST; in mxs_dma_desc_append()
427 last->cmd.next = mxs_dma_cmd_address(pdesc); in mxs_dma_desc_append()
432 pdesc->flags |= MXS_DMA_DESC_READY; in mxs_dma_desc_append()
433 if (pdesc->flags & MXS_DMA_DESC_FIRST) in mxs_dma_desc_append()
435 list_add_tail(&pdesc->node, &pchan->active); in mxs_dma_desc_append()
437 mxs_dma_flush_desc(pdesc); in mxs_dma_desc_append()
458 struct mxs_dma_desc *pdesc; in mxs_dma_finish() local
478 pdesc = list_entry(p, struct mxs_dma_desc, node); in mxs_dma_finish()
479 pdesc->flags &= ~MXS_DMA_DESC_READY; in mxs_dma_finish()
486 if (pdesc->flags & MXS_DMA_DESC_LAST) in mxs_dma_finish()
552 void mxs_dma_circ_start(int chan, struct mxs_dma_desc *pdesc) in mxs_dma_circ_start() argument
557 mxs_dma_flush_desc(pdesc); in mxs_dma_circ_start()
561 writel(mxs_dma_cmd_address(pdesc), in mxs_dma_circ_start()