aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ppc4xx/adma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/ppc4xx/adma.c')
-rw-r--r--drivers/dma/ppc4xx/adma.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
index d44626fa35ad..c6079fcca13f 100644
--- a/drivers/dma/ppc4xx/adma.c
+++ b/drivers/dma/ppc4xx/adma.c
@@ -3935,12 +3935,13 @@ static void ppc440spe_adma_free_chan_resources(struct dma_chan *chan)
3935} 3935}
3936 3936
3937/** 3937/**
3938 * ppc440spe_adma_is_complete - poll the status of an ADMA transaction 3938 * ppc440spe_adma_tx_status - poll the status of an ADMA transaction
3939 * @chan: ADMA channel handle 3939 * @chan: ADMA channel handle
3940 * @cookie: ADMA transaction identifier 3940 * @cookie: ADMA transaction identifier
3941 * @txstate: a holder for the current state of the channel
3941 */ 3942 */
3942static enum dma_status ppc440spe_adma_is_complete(struct dma_chan *chan, 3943static enum dma_status ppc440spe_adma_tx_status(struct dma_chan *chan,
3943 dma_cookie_t cookie, dma_cookie_t *done, dma_cookie_t *used) 3944 dma_cookie_t cookie, struct dma_tx_state *txstate)
3944{ 3945{
3945 struct ppc440spe_adma_chan *ppc440spe_chan; 3946 struct ppc440spe_adma_chan *ppc440spe_chan;
3946 dma_cookie_t last_used; 3947 dma_cookie_t last_used;
@@ -3951,10 +3952,7 @@ static enum dma_status ppc440spe_adma_is_complete(struct dma_chan *chan,
3951 last_used = chan->cookie; 3952 last_used = chan->cookie;
3952 last_complete = ppc440spe_chan->completed_cookie; 3953 last_complete = ppc440spe_chan->completed_cookie;
3953 3954
3954 if (done) 3955 dma_set_tx_state(txstate, last_complete, last_used, 0);
3955 *done = last_complete;
3956 if (used)
3957 *used = last_used;
3958 3956
3959 ret = dma_async_is_complete(cookie, last_complete, last_used); 3957 ret = dma_async_is_complete(cookie, last_complete, last_used);
3960 if (ret == DMA_SUCCESS) 3958 if (ret == DMA_SUCCESS)
@@ -3965,10 +3963,7 @@ static enum dma_status ppc440spe_adma_is_complete(struct dma_chan *chan,
3965 last_used = chan->cookie; 3963 last_used = chan->cookie;
3966 last_complete = ppc440spe_chan->completed_cookie; 3964 last_complete = ppc440spe_chan->completed_cookie;
3967 3965
3968 if (done) 3966 dma_set_tx_state(txstate, last_complete, last_used, 0);
3969 *done = last_complete;
3970 if (used)
3971 *used = last_used;
3972 3967
3973 return dma_async_is_complete(cookie, last_complete, last_used); 3968 return dma_async_is_complete(cookie, last_complete, last_used);
3974} 3969}
@@ -4180,7 +4175,7 @@ static void ppc440spe_adma_init_capabilities(struct ppc440spe_adma_device *adev)
4180 ppc440spe_adma_alloc_chan_resources; 4175 ppc440spe_adma_alloc_chan_resources;
4181 adev->common.device_free_chan_resources = 4176 adev->common.device_free_chan_resources =
4182 ppc440spe_adma_free_chan_resources; 4177 ppc440spe_adma_free_chan_resources;
4183 adev->common.device_is_tx_complete = ppc440spe_adma_is_complete; 4178 adev->common.device_tx_status = ppc440spe_adma_tx_status;
4184 adev->common.device_issue_pending = ppc440spe_adma_issue_pending; 4179 adev->common.device_issue_pending = ppc440spe_adma_issue_pending;
4185 4180
4186 /* Set prep routines based on capability */ 4181 /* Set prep routines based on capability */