diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/avr32/mach-at32ap/extint.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c index e108e7bba8c0..81a4a02f5f42 100644 --- a/arch/avr32/mach-at32ap/extint.c +++ b/arch/avr32/mach-at32ap/extint.c | |||
@@ -130,8 +130,11 @@ static int eic_set_irq_type(unsigned int irq, unsigned int flow_type) | |||
130 | eic_writel(eic, EDGE, edge); | 130 | eic_writel(eic, EDGE, edge); |
131 | eic_writel(eic, LEVEL, level); | 131 | eic_writel(eic, LEVEL, level); |
132 | 132 | ||
133 | if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) | 133 | if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) { |
134 | flow_type |= IRQ_LEVEL; | 134 | flow_type |= IRQ_LEVEL; |
135 | __set_irq_handler_unlocked(irq, handle_level_irq); | ||
136 | } else | ||
137 | __set_irq_handler_unlocked(irq, handle_edge_irq); | ||
135 | desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); | 138 | desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); |
136 | desc->status |= flow_type; | 139 | desc->status |= flow_type; |
137 | } | 140 | } |
@@ -151,9 +154,8 @@ static struct irq_chip eic_chip = { | |||
151 | static void demux_eic_irq(unsigned int irq, struct irq_desc *desc) | 154 | static void demux_eic_irq(unsigned int irq, struct irq_desc *desc) |
152 | { | 155 | { |
153 | struct eic *eic = desc->handler_data; | 156 | struct eic *eic = desc->handler_data; |
154 | struct irq_desc *ext_desc; | ||
155 | unsigned long status, pending; | 157 | unsigned long status, pending; |
156 | unsigned int i, ext_irq; | 158 | unsigned int i; |
157 | 159 | ||
158 | status = eic_readl(eic, ISR); | 160 | status = eic_readl(eic, ISR); |
159 | pending = status & eic_readl(eic, IMR); | 161 | pending = status & eic_readl(eic, IMR); |
@@ -162,12 +164,7 @@ static void demux_eic_irq(unsigned int irq, struct irq_desc *desc) | |||
162 | i = fls(pending) - 1; | 164 | i = fls(pending) - 1; |
163 | pending &= ~(1 << i); | 165 | pending &= ~(1 << i); |
164 | 166 | ||
165 | ext_irq = i + eic->first_irq; | 167 | generic_handle_irq(i + eic->first_irq); |
166 | ext_desc = irq_desc + ext_irq; | ||
167 | if (ext_desc->status & IRQ_LEVEL) | ||
168 | handle_level_irq(ext_irq, ext_desc); | ||
169 | else | ||
170 | handle_edge_irq(ext_irq, ext_desc); | ||
171 | } | 168 | } |
172 | } | 169 | } |
173 | 170 | ||
@@ -236,9 +233,8 @@ static int __init eic_probe(struct platform_device *pdev) | |||
236 | eic->chip = &eic_chip; | 233 | eic->chip = &eic_chip; |
237 | 234 | ||
238 | for (i = 0; i < nr_irqs; i++) { | 235 | for (i = 0; i < nr_irqs; i++) { |
239 | /* NOTE the handler we set here is ignored by the demux */ | ||
240 | set_irq_chip_and_handler(eic->first_irq + i, &eic_chip, | 236 | set_irq_chip_and_handler(eic->first_irq + i, &eic_chip, |
241 | handle_level_irq); | 237 | handle_edge_irq); |
242 | set_irq_chip_data(eic->first_irq + i, eic); | 238 | set_irq_chip_data(eic->first_irq + i, eic); |
243 | } | 239 | } |
244 | 240 | ||