summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorAlessandro Rubini <rubini@gnudd.com>2009-07-02 15:28:52 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-07-02 21:20:44 +0100
commit8c81b52422147b4b09f5adb8d0c6963342a336c6 (patch)
treef4cf43c1353c5dfd29e68c64e8efe85368251052 /arch/arm
parent87e8824b4588076409692b82ef4b1d98f25cd400 (diff)
downloadlinux-3.10-8c81b52422147b4b09f5adb8d0c6963342a336c6.tar.gz
linux-3.10-8c81b52422147b4b09f5adb8d0c6963342a336c6.tar.bz2
linux-3.10-8c81b52422147b4b09f5adb8d0c6963342a336c6.zip
[ARM] 5583/1: VIC: acknowledge software interrupts
The PrimeCell Vectored Interrupt Controller offers a way to trigger any interrupt through software. This is a useful tool for developing, but such software interrupt can only be acked by writing a bit in the "software clear" register, or the handler will loop forever. This splits ack from mask, and acks the soft irq in case it was the source. Signed-off-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/common/vic.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
index 27714ab30f2..bc1f9ad61ff 100644
--- a/arch/arm/common/vic.c
+++ b/arch/arm/common/vic.c
@@ -26,6 +26,15 @@
#include <asm/mach/irq.h>
#include <asm/hardware/vic.h>
+static void vic_ack_irq(unsigned int irq)
+{
+ void __iomem *base = get_irq_chip_data(irq);
+ irq &= 31;
+ writel(1 << irq, base + VIC_INT_ENABLE_CLEAR);
+ /* moreover, clear the soft-triggered, in case it was the reason */
+ writel(1 << irq, base + VIC_INT_SOFT_CLEAR);
+}
+
static void vic_mask_irq(unsigned int irq)
{
void __iomem *base = get_irq_chip_data(irq);
@@ -253,7 +262,7 @@ static inline void vic_pm_register(void __iomem *base, unsigned int irq, u32 arg
static struct irq_chip vic_chip = {
.name = "VIC",
- .ack = vic_mask_irq,
+ .ack = vic_ack_irq,
.mask = vic_mask_irq,
.unmask = vic_unmask_irq,
.set_wake = vic_set_wake,