提交 d04525ed 编写于 作者: S Shawn Guo 提交者: Vinod Koul

dma: mxs-dma: enable channel in device_issue_pending call

Enable channel in device_issue_pending call, so that the order between
cookie assignment and channel enabling can be ensured naturally.

It fixes the mxs gpmi-nand breakage which is caused by the incorrect
order of cookie assigning and channel enabling.
Suggested-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
Tested-by: NHuang Shijie <b32955@freescale.com>
Tested-by <samgandhi9@gmail.com>
Signed-off-by: NVinod Koul <vinod.koul@linux.intel.com>
上级 60f2951e
...@@ -201,10 +201,6 @@ static struct mxs_dma_chan *to_mxs_dma_chan(struct dma_chan *chan) ...@@ -201,10 +201,6 @@ static struct mxs_dma_chan *to_mxs_dma_chan(struct dma_chan *chan)
static dma_cookie_t mxs_dma_tx_submit(struct dma_async_tx_descriptor *tx) static dma_cookie_t mxs_dma_tx_submit(struct dma_async_tx_descriptor *tx)
{ {
struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(tx->chan);
mxs_dma_enable_chan(mxs_chan);
return dma_cookie_assign(tx); return dma_cookie_assign(tx);
} }
...@@ -558,9 +554,9 @@ static enum dma_status mxs_dma_tx_status(struct dma_chan *chan, ...@@ -558,9 +554,9 @@ static enum dma_status mxs_dma_tx_status(struct dma_chan *chan,
static void mxs_dma_issue_pending(struct dma_chan *chan) static void mxs_dma_issue_pending(struct dma_chan *chan)
{ {
/* struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
* Nothing to do. We only have a single descriptor.
*/ mxs_dma_enable_chan(mxs_chan);
} }
static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma) static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma)
......
...@@ -363,6 +363,7 @@ static void mxs_mmc_bc(struct mxs_mmc_host *host) ...@@ -363,6 +363,7 @@ static void mxs_mmc_bc(struct mxs_mmc_host *host)
goto out; goto out;
dmaengine_submit(desc); dmaengine_submit(desc);
dma_async_issue_pending(host->dmach);
return; return;
out: out:
...@@ -403,6 +404,7 @@ static void mxs_mmc_ac(struct mxs_mmc_host *host) ...@@ -403,6 +404,7 @@ static void mxs_mmc_ac(struct mxs_mmc_host *host)
goto out; goto out;
dmaengine_submit(desc); dmaengine_submit(desc);
dma_async_issue_pending(host->dmach);
return; return;
out: out:
...@@ -531,6 +533,7 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host) ...@@ -531,6 +533,7 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)
goto out; goto out;
dmaengine_submit(desc); dmaengine_submit(desc);
dma_async_issue_pending(host->dmach);
return; return;
out: out:
dev_warn(mmc_dev(host->mmc), dev_warn(mmc_dev(host->mmc),
......
...@@ -266,6 +266,7 @@ int start_dma_without_bch_irq(struct gpmi_nand_data *this, ...@@ -266,6 +266,7 @@ int start_dma_without_bch_irq(struct gpmi_nand_data *this,
desc->callback = dma_irq_callback; desc->callback = dma_irq_callback;
desc->callback_param = this; desc->callback_param = this;
dmaengine_submit(desc); dmaengine_submit(desc);
dma_async_issue_pending(get_dma_chan(this));
/* Wait for the interrupt from the DMA block. */ /* Wait for the interrupt from the DMA block. */
err = wait_for_completion_timeout(dma_c, msecs_to_jiffies(1000)); err = wait_for_completion_timeout(dma_c, msecs_to_jiffies(1000));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册