davinci: edma: clear interrupt status for interrupt enabled channels only

Previous thread: ARM: SAMSUNG: Implements cfg_gpio function for Samsung touchscreen by Linux Kernel Mailing List on Wednesday, May 19, 2010 - 1:03 pm. (1 message)

Next thread: Input: s3c24xx_ts - Add FEAT for Samsung touchscreen support by Linux Kernel Mailing List on Wednesday, May 19, 2010 - 1:03 pm. (1 message)
From: Linux Kernel Mailing List
Date: Wednesday, May 19, 2010 - 1:03 pm

Gitweb:     http://git.kernel.org/linus/a7e05065f562ae347db36b0ef644525cd1e89ecd
Commit:     a7e05065f562ae347db36b0ef644525cd1e89ecd
Parent:     d154fed7234331dc29240deb04f92f382000e66b
Author:     Anuj Aggarwal <anuj.aggarwal@ti.com>
AuthorDate: Mon Mar 8 15:05:58 2010 +0530
Committer:  Kevin Hilman <khilman@deeprootsystems.com>
CommitDate: Thu May 6 15:02:02 2010 -0700

    davinci: edma: clear interrupt status for interrupt enabled channels only
    
    Currently, the ISR in the EDMA driver clears the pending interrupt for all
    channels without regard to whether that channel has a registered callback
    or not.
    
    This causes problems for devices like DM355/DM365 where the multimedia
    accelerator uses EDMA by polling on the interrupt pending bits of some of the
    EDMA channels. Since these channels are actually allocated through the Linux
    EDMA driver (by an out-of-kernel module), the same shadow region is used by
    Linux and accelerator. There a race between the Linux ISR and the polling code
    running on the accelerator on the IPR (interrupt pending register).
    
    This patch fixes the issue by making the ISR clear the interrupts only for
    those channels which have interrupt enabled. The channels which are allocated
    for the purpose of being polled on by the accelerator will not have a callback
    function provided and so will not have IER (interrupt enable register) bits set.
    
    Tested on DM365 and OMAP-L137/L138 with audio and MMC/SD (as EDMA users).
    
    Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
    Signed-off-by: Sekhar Nori <nsekhar@ti.com>
    CC: Archith John Bency <archith@ti.com>
    Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/mach-davinci/dma.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c
index 5313738..0bf290b 100644
--- a/arch/arm/mach-davinci/dma.c
+++ ...
Previous thread: ARM: SAMSUNG: Implements cfg_gpio function for Samsung touchscreen by Linux Kernel Mailing List on Wednesday, May 19, 2010 - 1:03 pm. (1 message)

Next thread: Input: s3c24xx_ts - Add FEAT for Samsung touchscreen support by Linux Kernel Mailing List on Wednesday, May 19, 2010 - 1:03 pm. (1 message)