Lines Matching full:chain
51 writel_relaxed(dreq->chain.first->cur_dma, in mv_cesa_dma_step()
62 for (tdma = dreq->chain.first; tdma;) { in mv_cesa_dma_cleanup()
75 dreq->chain.first = NULL; in mv_cesa_dma_cleanup()
76 dreq->chain.last = NULL; in mv_cesa_dma_cleanup()
84 for (tdma = dreq->chain.first; tdma; tdma = tdma->next) { in mv_cesa_dma_prepare()
99 if (engine->chain.first == NULL && engine->chain.last == NULL) { in mv_cesa_tdma_chain()
100 engine->chain.first = dreq->chain.first; in mv_cesa_tdma_chain()
101 engine->chain.last = dreq->chain.last; in mv_cesa_tdma_chain()
105 last = engine->chain.last; in mv_cesa_tdma_chain()
106 last->next = dreq->chain.first; in mv_cesa_tdma_chain()
107 engine->chain.last = dreq->chain.last; in mv_cesa_tdma_chain()
110 * Break the DMA chain if the CESA_TDMA_BREAK_CHAIN is set on in mv_cesa_tdma_chain()
111 * the last element of the current chain, or if the request in mv_cesa_tdma_chain()
116 !(dreq->chain.first->flags & CESA_TDMA_SET_STATE)) in mv_cesa_tdma_chain()
117 last->next_dma = cpu_to_le32(dreq->chain.first->cur_dma); in mv_cesa_tdma_chain()
130 for (tdma = engine->chain.first; tdma; tdma = next) { in mv_cesa_tdma_process()
152 engine->chain.first = tdma->next; in mv_cesa_tdma_process()
155 /* If this is the last request, clear the chain */ in mv_cesa_tdma_process()
156 if (engine->chain.first == NULL) in mv_cesa_tdma_process()
157 engine->chain.last = NULL; in mv_cesa_tdma_process()
192 mv_cesa_dma_add_desc(struct mv_cesa_tdma_chain *chain, gfp_t flags) in mv_cesa_dma_add_desc() argument
203 if (chain->last) { in mv_cesa_dma_add_desc()
204 chain->last->next_dma = cpu_to_le32(dma_handle); in mv_cesa_dma_add_desc()
205 chain->last->next = new_tdma; in mv_cesa_dma_add_desc()
207 chain->first = new_tdma; in mv_cesa_dma_add_desc()
210 chain->last = new_tdma; in mv_cesa_dma_add_desc()
215 int mv_cesa_dma_add_result_op(struct mv_cesa_tdma_chain *chain, dma_addr_t src, in mv_cesa_dma_add_result_op() argument
220 tdma = mv_cesa_dma_add_desc(chain, gfp_flags); in mv_cesa_dma_add_result_op()
227 * req, just pick the first one in the chain. in mv_cesa_dma_add_result_op()
229 for (op_desc = chain->first; op_desc; op_desc = op_desc->next) { in mv_cesa_dma_add_result_op()
249 struct mv_cesa_op_ctx *mv_cesa_dma_add_op(struct mv_cesa_tdma_chain *chain, in mv_cesa_dma_add_op() argument
259 tdma = mv_cesa_dma_add_desc(chain, flags); in mv_cesa_dma_add_op()
271 tdma = chain->last; in mv_cesa_dma_add_op()
281 int mv_cesa_dma_add_data_transfer(struct mv_cesa_tdma_chain *chain, in mv_cesa_dma_add_data_transfer() argument
287 tdma = mv_cesa_dma_add_desc(chain, gfp_flags); in mv_cesa_dma_add_data_transfer()
301 int mv_cesa_dma_add_dummy_launch(struct mv_cesa_tdma_chain *chain, gfp_t flags) in mv_cesa_dma_add_dummy_launch() argument
305 tdma = mv_cesa_dma_add_desc(chain, flags); in mv_cesa_dma_add_dummy_launch()
309 int mv_cesa_dma_add_dummy_end(struct mv_cesa_tdma_chain *chain, gfp_t flags) in mv_cesa_dma_add_dummy_end() argument
313 tdma = mv_cesa_dma_add_desc(chain, flags); in mv_cesa_dma_add_dummy_end()
322 int mv_cesa_dma_add_op_transfers(struct mv_cesa_tdma_chain *chain, in mv_cesa_dma_add_op_transfers() argument
344 ret = mv_cesa_dma_add_data_transfer(chain, dst, src, len, in mv_cesa_dma_add_op_transfers()