From: Sascha Hauer <s.hauer@pengutronix.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Vinod Koul <vinod.koul@intel.com>,
Javier Martin <javier.martin@vista-silicon.com>,
linux-kernel@vger.kernel.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Chris Ball <cjb@laptop.org>,
Sascha Hauer <s.hauer@pengutronix.de>
Subject: [PATCH 4/4] dma: imx-sdma: start transfer in issue_pending
Date: Mon, 9 Jan 2012 10:32:50 +0100 [thread overview]
Message-ID: <1326101570-3716-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1326101570-3716-1-git-send-email-s.hauer@pengutronix.de>
The DMA API requires that transfers are started in issue_pending
instead of tx_submit. Fix this.
Signed-off-by: Sascha Hauer <s.hauer@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
next prev parent reply other threads:[~2012-01-09 9:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-09 9:32 [PATCH] fix starting of transfers in i.MX dma drivers Sascha Hauer
2012-01-09 9:32 ` [PATCH 1/4] mmc: mxcmmc: add missing dma_async_issue_pending Sascha Hauer
2012-01-09 9:32 ` [PATCH 2/4] ASoC: i.MX: Add " Sascha Hauer
2012-01-09 16:13 ` Mark Brown
2012-01-10 8:39 ` Sascha Hauer
2012-01-09 9:32 ` [PATCH 3/4] dma: imx-dma: start transfer in issue_pending Sascha Hauer
2012-01-09 10:51 ` Russell King - ARM Linux
2012-01-09 9:32 ` Sascha Hauer [this message]
2012-01-12 12:25 ` [PATCH] fix starting of transfers in i.MX dma drivers javier Martin
2012-01-15 17:07 ` Koul, Vinod
2012-01-30 9:12 ` Vinod Koul
2012-01-30 12:22 ` javier Martin
2012-01-30 14:03 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1326101570-3716-5-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=cjb@laptop.org \
--cc=javier.martin@vista-silicon.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).