summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChaitanya Bandi <bandik@nvidia.com>2012-04-16 16:08:35 +0530
committerSimone Willett <swillett@nvidia.com>2012-04-18 11:38:44 -0700
commit25eb47aef9013f06b3560719966e682e3064907b (patch)
tree9d775b5b8655b3f30a60bcd83da9df0274b53257
parentff8057097a6bc0a7c748adf86480a7d1ccdbd381 (diff)
ARM: tegra: dma: Add API to get channel id
Added tegra_dma_get_channel_id API to determine the id of a given channel. Bug 969125 Change-Id: Ibad67d65c87dc267a4e6942557c02acbd0f6e938 Signed-off-by: Chaitanya Bandi <bandik@nvidia.com> Reviewed-on: http://git-master/r/96714 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Sumit Bhattacharya <sumitb@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/dma.c6
-rw-r--r--arch/arm/mach-tegra/include/mach/dma.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c
index 66f9c24a946c..1c415083e8c4 100644
--- a/arch/arm/mach-tegra/dma.c
+++ b/arch/arm/mach-tegra/dma.c
@@ -678,6 +678,12 @@ void tegra_dma_free_channel(struct tegra_dma_channel *ch)
}
EXPORT_SYMBOL(tegra_dma_free_channel);
+int tegra_dma_get_channel_id(struct tegra_dma_channel *ch)
+{
+ return ch->id;
+}
+EXPORT_SYMBOL(tegra_dma_get_channel_id);
+
static bool tegra_dma_update_hw_partial(struct tegra_dma_channel *ch,
struct tegra_dma_req *req)
{
diff --git a/arch/arm/mach-tegra/include/mach/dma.h b/arch/arm/mach-tegra/include/mach/dma.h
index c6617e95c1af..a0423e950690 100644
--- a/arch/arm/mach-tegra/include/mach/dma.h
+++ b/arch/arm/mach-tegra/include/mach/dma.h
@@ -190,6 +190,7 @@ struct tegra_dma_channel *tegra_dma_allocate_channel(int mode,
const char namefmt[], ...);
void tegra_dma_free_channel(struct tegra_dma_channel *ch);
+int tegra_dma_get_channel_id(struct tegra_dma_channel *ch);
/*
* tegra_dma_cancel: Stop the dma and remove all request from pending request
* queue for transfer.