aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ipu/ipu_idmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/ipu/ipu_idmac.c')
-rw-r--r--drivers/dma/ipu/ipu_idmac.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c
index 39e7fb2a90e3..b9cef8b1701c 100644
--- a/drivers/dma/ipu/ipu_idmac.c
+++ b/drivers/dma/ipu/ipu_idmac.c
@@ -1646,15 +1646,16 @@ static void idmac_free_chan_resources(struct dma_chan *chan)
1646 tasklet_schedule(&to_ipu(idmac)->tasklet); 1646 tasklet_schedule(&to_ipu(idmac)->tasklet);
1647} 1647}
1648 1648
1649static enum dma_status idmac_is_tx_complete(struct dma_chan *chan, 1649static enum dma_status idmac_tx_status(struct dma_chan *chan,
1650 dma_cookie_t cookie, dma_cookie_t *done, dma_cookie_t *used) 1650 dma_cookie_t cookie, struct dma_tx_state *txstate)
1651{ 1651{
1652 struct idmac_channel *ichan = to_idmac_chan(chan); 1652 struct idmac_channel *ichan = to_idmac_chan(chan);
1653 1653
1654 if (done) 1654 if (txstate) {
1655 *done = ichan->completed; 1655 txstate->last = ichan->completed;
1656 if (used) 1656 txstate->used = chan->cookie;
1657 *used = chan->cookie; 1657 txstate->residue = 0;
1658 }
1658 if (cookie != chan->cookie) 1659 if (cookie != chan->cookie)
1659 return DMA_ERROR; 1660 return DMA_ERROR;
1660 return DMA_SUCCESS; 1661 return DMA_SUCCESS;
@@ -1673,7 +1674,7 @@ static int __init ipu_idmac_init(struct ipu *ipu)
1673 dma->dev = ipu->dev; 1674 dma->dev = ipu->dev;
1674 dma->device_alloc_chan_resources = idmac_alloc_chan_resources; 1675 dma->device_alloc_chan_resources = idmac_alloc_chan_resources;
1675 dma->device_free_chan_resources = idmac_free_chan_resources; 1676 dma->device_free_chan_resources = idmac_free_chan_resources;
1676 dma->device_is_tx_complete = idmac_is_tx_complete; 1677 dma->device_tx_status = idmac_tx_status;
1677 dma->device_issue_pending = idmac_issue_pending; 1678 dma->device_issue_pending = idmac_issue_pending;
1678 1679
1679 /* Compulsory for DMA_SLAVE fields */ 1680 /* Compulsory for DMA_SLAVE fields */