/* for cyclic capability */
bool cyclic;
+
+ enum dma_status chan_status;
};
struct dma_pl330_dmac {
}
/* pch will be unset if list was empty */
- if (!pch)
+ if (!pch || !pch->dmac)
return;
spin_lock_irqsave(&pch->lock, flags);
- list_splice_tail_init(list, &pch->work_list);
+ if (pch->chan_status == DMA_PAUSED) {
+ list_for_each_entry(desc, list, node) {
+ desc->status = DONE;
+ }
+ list_splice_tail_init(list, &pch->dmac->desc_pool);
+ } else {
+ list_splice_tail_init(list, &pch->work_list);
+ }
spin_unlock_irqrestore(&pch->lock, flags);
}
spin_lock_irqsave(&pch->lock, flags);
+ pch->chan_status = DMA_SUCCESS;
/* Pick up ripe tomatoes */
list_for_each_entry_safe(desc, _dt, &pch->work_list, node)
if (desc->status == DONE) {
}
list_splice_tail_init(&list, &pdmac->desc_pool);
+ pch->chan_status = DMA_PAUSED;
spin_unlock_irqrestore(&pch->lock, flags);
break;
case DMA_SLAVE_CONFIG: