summaryrefslogtreecommitdiffstats
path: root/drivers/irqchip/irq-hip04.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/irqchip/irq-hip04.c')
-rw-r--r--drivers/irqchip/irq-hip04.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/irqchip/irq-hip04.c b/drivers/irqchip/irq-hip04.c
index 6bc2deb73d53..7d6ffb5de84f 100644
--- a/drivers/irqchip/irq-hip04.c
+++ b/drivers/irqchip/irq-hip04.c
@@ -120,21 +120,24 @@ static int hip04_irq_set_type(struct irq_data *d, unsigned int type)
120{ 120{
121 void __iomem *base = hip04_dist_base(d); 121 void __iomem *base = hip04_dist_base(d);
122 unsigned int irq = hip04_irq(d); 122 unsigned int irq = hip04_irq(d);
123 int ret;
123 124
124 /* Interrupt configuration for SGIs can't be changed */ 125 /* Interrupt configuration for SGIs can't be changed */
125 if (irq < 16) 126 if (irq < 16)
126 return -EINVAL; 127 return -EINVAL;
127 128
128 if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING) 129 /* SPIs have restrictions on the supported types */
130 if (irq >= 32 && type != IRQ_TYPE_LEVEL_HIGH &&
131 type != IRQ_TYPE_EDGE_RISING)
129 return -EINVAL; 132 return -EINVAL;
130 133
131 raw_spin_lock(&irq_controller_lock); 134 raw_spin_lock(&irq_controller_lock);
132 135
133 gic_configure_irq(irq, type, base, NULL); 136 ret = gic_configure_irq(irq, type, base, NULL);
134 137
135 raw_spin_unlock(&irq_controller_lock); 138 raw_spin_unlock(&irq_controller_lock);
136 139
137 return 0; 140 return ret;
138} 141}
139 142
140#ifdef CONFIG_SMP 143#ifdef CONFIG_SMP