Commit 37f2e4bc authored by Andrew Victor's avatar Andrew Victor Committed by Russell King

[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: default avatarAndrew Victor <andrew@sanpeople.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 10e8e1fb
...@@ -92,10 +92,6 @@ static int at91rm9200_irq_type(unsigned irq, unsigned type) ...@@ -92,10 +92,6 @@ static int at91rm9200_irq_type(unsigned irq, unsigned type)
{ {
unsigned int smr, srctype; 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) { switch (type) {
case IRQT_HIGH: case IRQT_HIGH:
srctype = AT91_AIC_SRCTYPE_HIGH; srctype = AT91_AIC_SRCTYPE_HIGH;
...@@ -104,9 +100,13 @@ static int at91rm9200_irq_type(unsigned irq, unsigned type) ...@@ -104,9 +100,13 @@ static int at91rm9200_irq_type(unsigned irq, unsigned type)
srctype = AT91_AIC_SRCTYPE_RISING; srctype = AT91_AIC_SRCTYPE_RISING;
break; break;
case IRQT_LOW: case IRQT_LOW:
if ((irq > AT91_ID_FIQ) && (irq < AT91_ID_IRQ0)) /* only supported on external interrupts */
return -EINVAL;
srctype = AT91_AIC_SRCTYPE_LOW; srctype = AT91_AIC_SRCTYPE_LOW;
break; break;
case IRQT_FALLING: case IRQT_FALLING:
if ((irq > AT91_ID_FIQ) && (irq < AT91_ID_IRQ0)) /* only supported on external interrupts */
return -EINVAL;
srctype = AT91_AIC_SRCTYPE_FALLING; srctype = AT91_AIC_SRCTYPE_FALLING;
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment