summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinod G <vinodg@nvidia.com>2010-06-15 20:33:45 -0700
committerGary King <gking@nvidia.com>2010-06-16 11:09:19 -0700
commit55ef5bb3776db9ccf3fc0326a49075b3d3da1a35 (patch)
tree3205a4b5da5809a9b4243c007d27e1b285c7f849
parent867a0f02241ffa7849f98bc65d39e72a6f764879 (diff)
[ARM/tegra] dma: allow NULL threshold callback, mark shared channel used
not all continuous clients will need callbacks for halfbuffer full, so handle NULL callback functions as no-ops. also, since CH_MIN is used as the channel for shared DMA interrupts, it needs to be reserved so that it isn't allocated for exclusive clients Change-Id: I7880eaeb0e7151b7617f7f93e83029797d2ad0f4 Reviewed-on: http://git-master/r/2733 Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Tested-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/dma.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c
index a6e475ab64a7..fbe6b4d150b6 100644
--- a/arch/arm/mach-tegra/dma.c
+++ b/arch/arm/mach-tegra/dma.c
@@ -637,7 +637,8 @@ static void handle_continuous_dma(struct tegra_dma_channel *ch)
req->status = TEGRA_DMA_REQ_SUCCESS;
/* DMA lock is NOT held when callback is called */
spin_unlock(&ch->lock);
- req->threshold(req);
+ if (likely(req->threshold))
+ req->threshold(req);
return;
} else if (req->buffer_status ==
@@ -741,6 +742,8 @@ int __init tegra_dma_init(void)
}
ch->irq = irq;
}
+ /* mark the shared channel allocated */
+ __set_bit(TEGRA_SYSTEM_DMA_CH_MIN, channel_usage);
for (i = TEGRA_SYSTEM_DMA_CH_MAX+1; i < NV_DMA_MAX_CHANNELS; i++)
__set_bit(i, channel_usage);