summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/dma.c
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@nvidia.com>2011-05-14 17:58:29 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:41:40 -0800
commitad5c9dde210620973d860d6142c00466825fd62e (patch)
tree5b247e0e1ec3787a2e7564ca89f1ea0b882f3137 /arch/arm/mach-tegra/dma.c
parente26ad6591b5521d988394e9d4bb975060a55dbcf (diff)
Revert "ARM: tegra: dma: Do not call complete callback on canceled requests"
This reverts commit 5dba29d1f761502e75320770fc4c6cf9c8e00998. Rebase-Id: Rb6889e4755716f5baa5c7f272ae7d8c8b6d97ba5
Diffstat (limited to 'arch/arm/mach-tegra/dma.c')
-rw-r--r--arch/arm/mach-tegra/dma.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c
index 2f97a7655902..d525aec8f2a8 100644
--- a/arch/arm/mach-tegra/dma.c
+++ b/arch/arm/mach-tegra/dma.c
@@ -137,6 +137,24 @@ static void tegra_dma_update_hw_partial(struct tegra_dma_channel *ch,
struct tegra_dma_req *req);
static void tegra_dma_stop(struct tegra_dma_channel *ch);
+void tegra_dma_flush(struct tegra_dma_channel *ch)
+{
+}
+EXPORT_SYMBOL(tegra_dma_flush);
+
+void tegra_dma_dequeue(struct tegra_dma_channel *ch)
+{
+ struct tegra_dma_req *req;
+
+ if (tegra_dma_is_empty(ch))
+ return;
+
+ req = list_entry(ch->list.next, typeof(*req), node);
+
+ tegra_dma_dequeue_req(ch, req);
+ return;
+}
+
void tegra_dma_stop(struct tegra_dma_channel *ch)
{
u32 csr;
@@ -232,7 +250,7 @@ int tegra_dma_dequeue_req(struct tegra_dma_channel *ch,
}
if (!found) {
spin_unlock_irqrestore(&ch->lock, irq_flags);
- return -EINVAL;
+ return 0;
}
if (!stop)
@@ -268,6 +286,8 @@ skip_status:
spin_unlock_irqrestore(&ch->lock, irq_flags);
+ /* Callback should be called without any lock */
+ req->complete(req);
return 0;
}
EXPORT_SYMBOL(tegra_dma_dequeue_req);