From dff743fd36183a25d9ef83cafaf7e4974e15e6b4 Mon Sep 17 00:00:00 2001 From: Chaitanya Bandi Date: Mon, 16 Apr 2012 17:12:02 +0530 Subject: ARM: tegra: dma: Use no DMA interrupts if no callbacks If there are no callbacks associated with the request, dma interrupt is not enabled. Bug 969125 Change-Id: Ifbf2a8d6c474187927ee38af03cb96e53e199b83 Signed-off-by: Chaitanya Bandi Reviewed-on: http://git-master/r/96724 Reviewed-by: Automatic_Commit_Validation_User Tested-by: Sumit Bhattacharya Reviewed-by: Laxman Dewangan --- arch/arm/mach-tegra/dma.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c index 1c415083e8c4..e4fe67fcba95 100644 --- a/arch/arm/mach-tegra/dma.c +++ b/arch/arm/mach-tegra/dma.c @@ -394,7 +394,8 @@ skip_status: spin_unlock_irqrestore(&ch->lock, irq_flags); /* Callback should be called without any lock */ - req->complete(req); + if(req->complete) + req->complete(req); return 0; } EXPORT_SYMBOL(tegra_dma_dequeue_req); @@ -757,7 +758,10 @@ static void tegra_dma_update_hw(struct tegra_dma_channel *ch, u32 apb_ptr; u32 csr; - csr = CSR_IE_EOC | CSR_FLOW; + csr = CSR_FLOW; + if (req->complete || req->threshold) + csr |= CSR_IE_EOC; + ahb_seq = AHB_SEQ_INTR_ENB; switch (req->req_sel) { -- cgit v1.2.3