diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-01-31 12:42:51 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-01-31 12:42:51 +0100 |
commit | 60f1df5dc6ecd07befc332ae30109fb86505634c (patch) | |
tree | 77cb78a15424ff493f4d171d66752009b4483420 /drivers | |
parent | 2335d338a20a6f5ac70ae4338733c8ff5933f978 (diff) | |
parent | 341b9419a8c0a4cdb75773c576870f1eb655516d (diff) | |
download | linux-3.10-60f1df5dc6ecd07befc332ae30109fb86505634c.tar.gz linux-3.10-60f1df5dc6ecd07befc332ae30109fb86505634c.tar.bz2 linux-3.10-60f1df5dc6ecd07befc332ae30109fb86505634c.zip |
Merge branch 'dmaengine-shawn' into dmaengine
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/imx-sdma.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 1eb3f007740..0123740b973 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -450,7 +450,7 @@ static void sdma_handle_channel_loop(struct sdma_channel *sdmac) if (bd->mode.status & BD_RROR) sdmac->status = DMA_ERROR; else - sdmac->status = DMA_SUCCESS; + sdmac->status = DMA_IN_PROGRESS; bd->mode.status |= BD_DONE; sdmac->buf_tail++; @@ -942,15 +942,12 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg( param = BD_DONE | BD_EXTD | BD_CONT; - if (sdmac->flags & IMX_DMA_SG_LOOP) { + if (i + 1 == sg_len) { param |= BD_INTR; - if (i + 1 == sg_len) - param |= BD_WRAP; + param |= BD_LAST; + param &= ~BD_CONT; } - if (i + 1 == sg_len) - param |= BD_INTR; - dev_dbg(sdma->dev, "entry %d: count: %d dma: 0x%08x %s%s\n", i, count, sg->dma_address, param & BD_WRAP ? "wrap" : "", @@ -964,6 +961,7 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg( return &sdmac->desc; err_out: + sdmac->status = DMA_ERROR; return NULL; } @@ -1077,14 +1075,12 @@ static enum dma_status sdma_tx_status(struct dma_chan *chan, { struct sdma_channel *sdmac = to_sdma_chan(chan); dma_cookie_t last_used; - enum dma_status ret; last_used = chan->cookie; - ret = dma_async_is_complete(cookie, sdmac->last_completed, last_used); dma_set_tx_state(txstate, sdmac->last_completed, last_used, 0); - return ret; + return sdmac->status; } static void sdma_issue_pending(struct dma_chan *chan) |