Lines Matching defs:sdesc
117 struct sirfsoc_dma_desc *sdesc = NULL;
124 sdesc = list_first_entry(&schan->queued, struct sirfsoc_dma_desc,
127 list_move_tail(&sdesc->node, &schan->active);
130 writel_relaxed(sdesc->width, sdma->base + SIRFSOC_DMA_WIDTH_0 +
133 (sdesc->dir << SIRFSOC_DMA_DIR_CTRL_BIT),
135 writel_relaxed(sdesc->xlen, sdma->base + cid * 0x10 +
137 writel_relaxed(sdesc->ylen, sdma->base + cid * 0x10 +
146 writel(sdesc->addr >> 2, sdma->base + cid * 0x10 + SIRFSOC_DMA_CH_ADDR);
148 if (sdesc->cyclic) {
161 struct sirfsoc_dma_desc *sdesc = NULL;
173 sdesc = list_first_entry(&schan->active, struct sirfsoc_dma_desc,
175 if (!sdesc->cyclic) {
197 struct sirfsoc_dma_desc *sdesc;
214 list_for_each_entry(sdesc, &list, node) {
215 desc = &sdesc->desc;
231 sdesc = list_first_entry(&schan->active, struct sirfsoc_dma_desc,
234 if (!sdesc || (sdesc && !sdesc->cyclic)) {
244 desc = &sdesc->desc;
266 struct sirfsoc_dma_desc *sdesc;
270 sdesc = container_of(txd, struct sirfsoc_dma_desc, desc);
275 list_move_tail(&sdesc->node, &schan->queued);
401 struct sirfsoc_dma_desc *sdesc;
410 sdesc = kzalloc(sizeof(*sdesc), GFP_KERNEL);
411 if (!sdesc) {
417 dma_async_tx_descriptor_init(&sdesc->desc, chan);
418 sdesc->desc.flags = DMA_CTRL_ACK;
419 sdesc->desc.tx_submit = sirfsoc_dma_tx_submit;
421 list_add_tail(&sdesc->node, &descs);
441 struct sirfsoc_dma_desc *sdesc, *tmp;
459 list_for_each_entry_safe(sdesc, tmp, &descs, node)
460 kfree(sdesc);
488 struct sirfsoc_dma_desc *sdesc;
496 sdesc = list_first_entry(&schan->active, struct sirfsoc_dma_desc,
498 dma_request_bytes = (sdesc->xlen + 1) * (sdesc->ylen + 1) *
499 (sdesc->width * SIRFSOC_DMA_WORD_LEN);
504 residue = dma_request_bytes - (dma_pos - sdesc->addr);
518 struct sirfsoc_dma_desc *sdesc = NULL;
530 sdesc = list_first_entry(&schan->free, struct sirfsoc_dma_desc,
532 list_del(&sdesc->node);
536 if (!sdesc) {
551 sdesc->cyclic = 0;
552 sdesc->xlen = xt->sgl[0].size / SIRFSOC_DMA_WORD_LEN;
553 sdesc->width = (xt->sgl[0].size + xt->sgl[0].icg) /
555 sdesc->ylen = xt->numf - 1;
557 sdesc->addr = xt->src_start;
558 sdesc->dir = 1;
560 sdesc->addr = xt->dst_start;
561 sdesc->dir = 0;
564 list_add_tail(&sdesc->node, &schan->prepared);
572 return &sdesc->desc;
586 struct sirfsoc_dma_desc *sdesc = NULL;
606 sdesc = list_first_entry(&schan->free, struct sirfsoc_dma_desc,
608 list_del(&sdesc->node);
612 if (!sdesc)
617 sdesc->addr = addr;
618 sdesc->cyclic = 1;
619 sdesc->xlen = 0;
620 sdesc->ylen = buf_len / SIRFSOC_DMA_WORD_LEN - 1;
621 sdesc->width = 1;
622 list_add_tail(&sdesc->node, &schan->prepared);
625 return &sdesc->desc;
842 struct sirfsoc_dma_desc *sdesc;
865 sdesc = list_first_entry(&schan->active,
883 struct sirfsoc_dma_desc *sdesc;
898 sdesc = list_first_entry(&schan->active,
901 writel_relaxed(sdesc->width,
903 writel_relaxed(sdesc->xlen,
905 writel_relaxed(sdesc->ylen,
909 writel_relaxed(sdesc->addr >> 2,