diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-01-09 04:32:50 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2012-01-30 04:20:55 -0500 |
commit | 2b4f130e05cb28a9794921aad5139615e94a7b02 (patch) | |
tree | 0ebfcff3491cf5fc389692ef6179024a947c6657 /drivers/dma | |
parent | 5b3168763f507fd46285b7310fc2d18dafe7f1c7 (diff) |
dma: imx-sdma: start transfer in issue_pending
The DMA engine API requires that transfers are started in issue_pending
instead of tx_submit. Fix this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[corrected change log to DMA engine API insteadof DMA API]
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | 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 a8af379680c1..e58dbf638cc9 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c | |||
@@ -838,15 +838,12 @@ static dma_cookie_t sdma_tx_submit(struct dma_async_tx_descriptor *tx) | |||
838 | { | 838 | { |
839 | unsigned long flags; | 839 | unsigned long flags; |
840 | struct sdma_channel *sdmac = to_sdma_chan(tx->chan); | 840 | struct sdma_channel *sdmac = to_sdma_chan(tx->chan); |
841 | struct sdma_engine *sdma = sdmac->sdma; | ||
842 | dma_cookie_t cookie; | 841 | dma_cookie_t cookie; |
843 | 842 | ||
844 | spin_lock_irqsave(&sdmac->lock, flags); | 843 | spin_lock_irqsave(&sdmac->lock, flags); |
845 | 844 | ||
846 | cookie = sdma_assign_cookie(sdmac); | 845 | cookie = sdma_assign_cookie(sdmac); |
847 | 846 | ||
848 | sdma_enable_channel(sdma, sdmac->channel); | ||
849 | |||
850 | spin_unlock_irqrestore(&sdmac->lock, flags); | 847 | spin_unlock_irqrestore(&sdmac->lock, flags); |
851 | 848 | ||
852 | return cookie; | 849 | return cookie; |
@@ -1135,9 +1132,11 @@ static enum dma_status sdma_tx_status(struct dma_chan *chan, | |||
1135 | 1132 | ||
1136 | static void sdma_issue_pending(struct dma_chan *chan) | 1133 | static void sdma_issue_pending(struct dma_chan *chan) |
1137 | { | 1134 | { |
1138 | /* | 1135 | struct sdma_channel *sdmac = to_sdma_chan(chan); |
1139 | * Nothing to do. We only have a single descriptor | 1136 | struct sdma_engine *sdma = sdmac->sdma; |
1140 | */ | 1137 | |
1138 | if (sdmac->status == DMA_IN_PROGRESS) | ||
1139 | sdma_enable_channel(sdma, sdmac->channel); | ||
1141 | } | 1140 | } |
1142 | 1141 | ||
1143 | #define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1 34 | 1142 | #define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1 34 |