[PATCH 4/4] dma: imx-sdma: start transfer in issue_pending
Sascha Hauer
s.hauer at pengutronix.de
Mon Jan 9 04:32:50 EST 2012
The DMA API requires that transfers are started in issue_pending
instead of tx_submit. Fix this.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/dma/imx-sdma.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index f993955..eb28bb0 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -833,15 +833,12 @@ static struct sdma_channel *to_sdma_chan(struct dma_chan *chan)
static dma_cookie_t sdma_tx_submit(struct dma_async_tx_descriptor *tx)
{
struct sdma_channel *sdmac = to_sdma_chan(tx->chan);
- struct sdma_engine *sdma = sdmac->sdma;
dma_cookie_t cookie;
spin_lock_irq(&sdmac->lock);
cookie = sdma_assign_cookie(sdmac);
- sdma_enable_channel(sdma, sdmac->channel);
-
spin_unlock_irq(&sdmac->lock);
return cookie;
@@ -1126,9 +1123,11 @@ static enum dma_status sdma_tx_status(struct dma_chan *chan,
static void sdma_issue_pending(struct dma_chan *chan)
{
- /*
- * Nothing to do. We only have a single descriptor
- */
+ struct sdma_channel *sdmac = to_sdma_chan(chan);
+ struct sdma_engine *sdma = sdmac->sdma;
+
+ if (sdmac->status == DMA_IN_PROGRESS)
+ sdma_enable_channel(sdma, sdmac->channel);
}
#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1 34
--
1.7.7.3
More information about the linux-arm-kernel
mailing list