diff options
author | Dan Willemsen <dwillemsen@nvidia.com> | 2011-05-14 17:58:29 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:41:40 -0800 |
commit | ad5c9dde210620973d860d6142c00466825fd62e (patch) | |
tree | 5b247e0e1ec3787a2e7564ca89f1ea0b882f3137 /arch | |
parent | e26ad6591b5521d988394e9d4bb975060a55dbcf (diff) |
Revert "ARM: tegra: dma: Do not call complete callback on canceled requests"
This reverts commit 5dba29d1f761502e75320770fc4c6cf9c8e00998.
Rebase-Id: Rb6889e4755716f5baa5c7f272ae7d8c8b6d97ba5
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/dma.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/dma.h | 1 |
2 files changed, 22 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); diff --git a/arch/arm/mach-tegra/include/mach/dma.h b/arch/arm/mach-tegra/include/mach/dma.h index 60b669ae3948..d385b7a251be 100644 --- a/arch/arm/mach-tegra/include/mach/dma.h +++ b/arch/arm/mach-tegra/include/mach/dma.h @@ -142,6 +142,7 @@ int tegra_dma_enqueue_req(struct tegra_dma_channel *ch, struct tegra_dma_req *req); int tegra_dma_dequeue_req(struct tegra_dma_channel *ch, struct tegra_dma_req *req); +void tegra_dma_dequeue(struct tegra_dma_channel *ch); void tegra_dma_flush(struct tegra_dma_channel *ch); bool tegra_dma_is_req_inflight(struct tegra_dma_channel *ch, |