summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorAndrew Victor <andrew@sanpeople.com>2006-06-19 15:26:52 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-06-19 15:26:52 +0100
commit37f2e4bc120bd784e7f69f961233e1c16b74d170 (patch)
treefbe1d1b32bc81c0b5f5cf030639a13a51f08906b /arch/arm
parent10e8e1fb758eed5cfb0cae1b770f842624851e7b (diff)
[ARM] 3582/1: AT91RM9200 IRQ trigger types
Patch from Andrew Victor The AIC interrupt controller's set_irq_type() can also be used for internal interrupts. IRQT_LOW and IRQT_FALLING are the only options not supported for the internal interrupts. [Original patch from Karl Olsen] Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-at91rm9200/irq.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-at91rm9200/irq.c b/arch/arm/mach-at91rm9200/irq.c
index cb62bc83a1d..cc545b2c438 100644
--- a/arch/arm/mach-at91rm9200/irq.c
+++ b/arch/arm/mach-at91rm9200/irq.c
@@ -92,10 +92,6 @@ static int at91rm9200_irq_type(unsigned irq, unsigned type)
{
unsigned int smr, srctype;
- /* change triggering only for FIQ and external IRQ0..IRQ6 */
- if ((irq < AT91_ID_IRQ0) && (irq != AT91_ID_FIQ))
- return -EINVAL;
-
switch (type) {
case IRQT_HIGH:
srctype = AT91_AIC_SRCTYPE_HIGH;
@@ -104,9 +100,13 @@ static int at91rm9200_irq_type(unsigned irq, unsigned type)
srctype = AT91_AIC_SRCTYPE_RISING;
break;
case IRQT_LOW:
+ if ((irq > AT91_ID_FIQ) && (irq < AT91_ID_IRQ0)) /* only supported on external interrupts */
+ return -EINVAL;
srctype = AT91_AIC_SRCTYPE_LOW;
break;
case IRQT_FALLING:
+ if ((irq > AT91_ID_FIQ) && (irq < AT91_ID_IRQ0)) /* only supported on external interrupts */
+ return -EINVAL;
srctype = AT91_AIC_SRCTYPE_FALLING;
break;
default: