diff options
Diffstat (limited to 'arch/mips/sgi-ip27/ip27-irq.c')
-rw-r--r-- | arch/mips/sgi-ip27/ip27-irq.c | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index f01ba1f9077..5f8835b4e84 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c | |||
@@ -332,11 +332,6 @@ static inline void disable_bridge_irq(unsigned int irq) | |||
332 | intr_disconnect_level(cpu, swlevel); | 332 | intr_disconnect_level(cpu, swlevel); |
333 | } | 333 | } |
334 | 334 | ||
335 | static void mask_and_ack_bridge_irq(unsigned int irq) | ||
336 | { | ||
337 | disable_bridge_irq(irq); | ||
338 | } | ||
339 | |||
340 | static void end_bridge_irq(unsigned int irq) | 335 | static void end_bridge_irq(unsigned int irq) |
341 | { | 336 | { |
342 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)) && | 337 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)) && |
@@ -348,41 +343,16 @@ static struct irq_chip bridge_irq_type = { | |||
348 | .typename = "bridge", | 343 | .typename = "bridge", |
349 | .startup = startup_bridge_irq, | 344 | .startup = startup_bridge_irq, |
350 | .shutdown = shutdown_bridge_irq, | 345 | .shutdown = shutdown_bridge_irq, |
351 | .enable = enable_bridge_irq, | 346 | .ack = disable_bridge_irq, |
352 | .disable = disable_bridge_irq, | 347 | .mask = disable_bridge_irq, |
353 | .ack = mask_and_ack_bridge_irq, | 348 | .mask_ack = disable_bridge_irq, |
349 | .unmask = enable_bridge_irq, | ||
354 | .end = end_bridge_irq, | 350 | .end = end_bridge_irq, |
355 | }; | 351 | }; |
356 | 352 | ||
357 | static unsigned long irq_map[NR_IRQS / BITS_PER_LONG]; | ||
358 | |||
359 | int allocate_irqno(void) | ||
360 | { | ||
361 | int irq; | ||
362 | |||
363 | again: | ||
364 | irq = find_first_zero_bit(irq_map, NR_IRQS); | ||
365 | |||
366 | if (irq >= NR_IRQS) | ||
367 | return -ENOSPC; | ||
368 | |||
369 | if (test_and_set_bit(irq, irq_map)) | ||
370 | goto again; | ||
371 | |||
372 | return irq; | ||
373 | } | ||
374 | |||
375 | void free_irqno(unsigned int irq) | ||
376 | { | ||
377 | clear_bit(irq, irq_map); | ||
378 | } | ||
379 | |||
380 | void __devinit register_bridge_irq(unsigned int irq) | 353 | void __devinit register_bridge_irq(unsigned int irq) |
381 | { | 354 | { |
382 | irq_desc[irq].status = IRQ_DISABLED; | 355 | set_irq_chip_and_handler(irq, &bridge_irq_type, handle_level_irq); |
383 | irq_desc[irq].action = 0; | ||
384 | irq_desc[irq].depth = 1; | ||
385 | irq_desc[irq].chip = &bridge_irq_type; | ||
386 | } | 356 | } |
387 | 357 | ||
388 | int __devinit request_bridge_irq(struct bridge_controller *bc) | 358 | int __devinit request_bridge_irq(struct bridge_controller *bc) |