diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2012-03-22 15:31:09 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-04-05 08:40:18 -0700 |
commit | 4f7cac2afefe67fe4bc86becd5970437f12d7e0c (patch) | |
tree | 4f8934d47688e042a278fe09e2f1609948886064 /arch | |
parent | 7c52b96dc49e0123c3c5dd6d29f37d113d67ed37 (diff) |
ARM: tegra: fuse: Use tegra_dma_cancel() to abort request
To terminate request from dma, use the tegra_dma_cancel() inplace of
tegra_dma_dequeue().
The api tegra_dma_dequeue() is getting to be obsolete.
Change-Id: I4b886489458e4ec8f5eb43d857bf710fbb56f5ee
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/91751
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/apbio.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/apbio.c b/arch/arm/mach-tegra/apbio.c index 41eb0aa3c738..e227331c2f0f 100644 --- a/arch/arm/mach-tegra/apbio.c +++ b/arch/arm/mach-tegra/apbio.c @@ -41,6 +41,14 @@ static void apb_dma_complete(struct tegra_dma_req *req) complete(&tegra_apb_wait); } +static void cancel_dma(struct tegra_dma_channel *dma_chan, + struct tegra_dma_req *req) +{ + tegra_dma_cancel(dma_chan); + if (req->status == -TEGRA_DMA_REQ_ERROR_ABORTED) + req->complete(req); +} + static inline u32 apb_readl(unsigned long offset) { struct tegra_dma_req req; @@ -69,7 +77,7 @@ static inline u32 apb_readl(unsigned long offset) msecs_to_jiffies(400)); if (WARN(ret == 0, "apb read dma timed out")) { - tegra_dma_dequeue_req(tegra_apb_dma, &req); + cancel_dma(tegra_apb_dma, &req); *(u32 *)tegra_apb_bb = 0; } @@ -77,6 +85,7 @@ static inline u32 apb_readl(unsigned long offset) return *((u32 *)tegra_apb_bb); } + static inline void apb_writel(u32 value, unsigned long offset) { struct tegra_dma_req req; @@ -108,7 +117,7 @@ static inline void apb_writel(u32 value, unsigned long offset) msecs_to_jiffies(400)); if (WARN(ret == 0, "apb write dma timed out")) - tegra_dma_dequeue_req(tegra_apb_dma, &req); + cancel_dma(tegra_apb_dma, &req); mutex_unlock(&tegra_apb_dma_lock); } |