aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/txx9dmac.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@stericsson.com>2010-03-26 19:50:49 -0400
committerDan Williams <dan.j.williams@intel.com>2010-03-26 19:50:49 -0400
commit0793448187643b50af89d36b08470baf45a3cab4 (patch)
treeb3313ff58d47e26a8cf707d196177effa1aadfbe /drivers/dma/txx9dmac.c
parentc3635c78e500a52c9fcd55de381a72928d9e054d (diff)
DMAENGINE: generic channel status v2
Convert the device_is_tx_complete() operation on the DMA engine to a generic device_tx_status()operation which can return three states, DMA_TX_RUNNING, DMA_TX_COMPLETE, DMA_TX_PAUSED. [dan.j.williams@intel.com: update for timberdale] Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Maciej Sosnowski <maciej.sosnowski@intel.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Li Yang <leoli@freescale.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Cc: Magnus Damm <damm@opensource.se> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Joe Perches <joe@perches.com> Cc: Roland Dreier <rdreier@cisco.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/txx9dmac.c')
-rw-r--r--drivers/dma/txx9dmac.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c
index e528e15f44ab..a44e422cbc27 100644
--- a/drivers/dma/txx9dmac.c
+++ b/drivers/dma/txx9dmac.c
@@ -967,9 +967,8 @@ static int txx9dmac_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd)
967} 967}
968 968
969static enum dma_status 969static enum dma_status
970txx9dmac_is_tx_complete(struct dma_chan *chan, 970txx9dmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
971 dma_cookie_t cookie, 971 struct dma_tx_state *txstate)
972 dma_cookie_t *done, dma_cookie_t *used)
973{ 972{
974 struct txx9dmac_chan *dc = to_txx9dmac_chan(chan); 973 struct txx9dmac_chan *dc = to_txx9dmac_chan(chan);
975 dma_cookie_t last_used; 974 dma_cookie_t last_used;
@@ -991,10 +990,11 @@ txx9dmac_is_tx_complete(struct dma_chan *chan,
991 ret = dma_async_is_complete(cookie, last_complete, last_used); 990 ret = dma_async_is_complete(cookie, last_complete, last_used);
992 } 991 }
993 992
994 if (done) 993 if (txstate) {
995 *done = last_complete; 994 txstate->last = last_complete;
996 if (used) 995 txstate->used = last_used;
997 *used = last_used; 996 txstate->residue = 0;
997 }
998 998
999 return ret; 999 return ret;
1000} 1000}
@@ -1160,7 +1160,7 @@ static int __init txx9dmac_chan_probe(struct platform_device *pdev)
1160 dc->dma.device_alloc_chan_resources = txx9dmac_alloc_chan_resources; 1160 dc->dma.device_alloc_chan_resources = txx9dmac_alloc_chan_resources;
1161 dc->dma.device_free_chan_resources = txx9dmac_free_chan_resources; 1161 dc->dma.device_free_chan_resources = txx9dmac_free_chan_resources;
1162 dc->dma.device_control = txx9dmac_control; 1162 dc->dma.device_control = txx9dmac_control;
1163 dc->dma.device_is_tx_complete = txx9dmac_is_tx_complete; 1163 dc->dma.device_tx_status = txx9dmac_tx_status;
1164 dc->dma.device_issue_pending = txx9dmac_issue_pending; 1164 dc->dma.device_issue_pending = txx9dmac_issue_pending;
1165 if (pdata && pdata->memcpy_chan == ch) { 1165 if (pdata && pdata->memcpy_chan == ch) {
1166 dc->dma.device_prep_dma_memcpy = txx9dmac_prep_dma_memcpy; 1166 dc->dma.device_prep_dma_memcpy = txx9dmac_prep_dma_memcpy;