diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-09-11 05:28:04 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-11-08 16:35:52 -0500 |
commit | d890d73995257b4e10cdd7d55bad80e34a71ba22 (patch) | |
tree | 3e4ee85a2d8d126e1570c7ea47178a2a8a627849 /arch/m68k/mac/via.c | |
parent | a03010ed9b399fdbc28ac8836e0a6d4b15403f9f (diff) |
m68k/irq: Remove obsolete m68k irq framework
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mac/via.c')
-rw-r--r-- | arch/m68k/mac/via.c | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index b8156ac496a0..f1600ad26621 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c | |||
@@ -28,9 +28,7 @@ | |||
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
32 | #include <linux/irq.h> | 31 | #include <linux/irq.h> |
33 | #endif | ||
34 | 32 | ||
35 | #include <asm/bootinfo.h> | 33 | #include <asm/bootinfo.h> |
36 | #include <asm/macintosh.h> | 34 | #include <asm/macintosh.h> |
@@ -417,7 +415,6 @@ void __init via_nubus_init(void) | |||
417 | * via6522.c :-), disable/pending masks added. | 415 | * via6522.c :-), disable/pending masks added. |
418 | */ | 416 | */ |
419 | 417 | ||
420 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
421 | void via1_irq(unsigned int irq, struct irq_desc *desc) | 418 | void via1_irq(unsigned int irq, struct irq_desc *desc) |
422 | { | 419 | { |
423 | int irq_num; | 420 | int irq_num; |
@@ -459,58 +456,12 @@ static void via2_irq(unsigned int irq, struct irq_desc *desc) | |||
459 | irq_bit <<= 1; | 456 | irq_bit <<= 1; |
460 | } while (events >= irq_bit); | 457 | } while (events >= irq_bit); |
461 | } | 458 | } |
462 | #else | ||
463 | irqreturn_t via1_irq(int irq, void *dev_id) | ||
464 | { | ||
465 | int irq_num; | ||
466 | unsigned char irq_bit, events; | ||
467 | |||
468 | events = via1[vIFR] & via1[vIER] & 0x7F; | ||
469 | if (!events) | ||
470 | return IRQ_NONE; | ||
471 | |||
472 | irq_num = VIA1_SOURCE_BASE; | ||
473 | irq_bit = 1; | ||
474 | do { | ||
475 | if (events & irq_bit) { | ||
476 | via1[vIFR] = irq_bit; | ||
477 | generic_handle_irq(irq_num); | ||
478 | } | ||
479 | ++irq_num; | ||
480 | irq_bit <<= 1; | ||
481 | } while (events >= irq_bit); | ||
482 | return IRQ_HANDLED; | ||
483 | } | ||
484 | |||
485 | irqreturn_t via2_irq(int irq, void *dev_id) | ||
486 | { | ||
487 | int irq_num; | ||
488 | unsigned char irq_bit, events; | ||
489 | |||
490 | events = via2[gIFR] & via2[gIER] & 0x7F; | ||
491 | if (!events) | ||
492 | return IRQ_NONE; | ||
493 | |||
494 | irq_num = VIA2_SOURCE_BASE; | ||
495 | irq_bit = 1; | ||
496 | do { | ||
497 | if (events & irq_bit) { | ||
498 | via2[gIFR] = irq_bit | rbv_clear; | ||
499 | generic_handle_irq(irq_num); | ||
500 | } | ||
501 | ++irq_num; | ||
502 | irq_bit <<= 1; | ||
503 | } while (events >= irq_bit); | ||
504 | return IRQ_HANDLED; | ||
505 | } | ||
506 | #endif | ||
507 | 459 | ||
508 | /* | 460 | /* |
509 | * Dispatch Nubus interrupts. We are called as a secondary dispatch by the | 461 | * Dispatch Nubus interrupts. We are called as a secondary dispatch by the |
510 | * VIA2 dispatcher as a fast interrupt handler. | 462 | * VIA2 dispatcher as a fast interrupt handler. |
511 | */ | 463 | */ |
512 | 464 | ||
513 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
514 | void via_nubus_irq(unsigned int irq, struct irq_desc *desc) | 465 | void via_nubus_irq(unsigned int irq, struct irq_desc *desc) |
515 | { | 466 | { |
516 | int slot_irq; | 467 | int slot_irq; |
@@ -545,43 +496,6 @@ void via_nubus_irq(unsigned int irq, struct irq_desc *desc) | |||
545 | events &= ~via2[vDirA]; | 496 | events &= ~via2[vDirA]; |
546 | } while (events); | 497 | } while (events); |
547 | } | 498 | } |
548 | #else | ||
549 | irqreturn_t via_nubus_irq(int irq, void *dev_id) | ||
550 | { | ||
551 | int slot_irq; | ||
552 | unsigned char slot_bit, events; | ||
553 | |||
554 | events = ~via2[gBufA] & 0x7F; | ||
555 | if (rbv_present) | ||
556 | events &= via2[rSIER]; | ||
557 | else | ||
558 | events &= ~via2[vDirA]; | ||
559 | if (!events) | ||
560 | return IRQ_NONE; | ||
561 | |||
562 | do { | ||
563 | slot_irq = IRQ_NUBUS_F; | ||
564 | slot_bit = 0x40; | ||
565 | do { | ||
566 | if (events & slot_bit) { | ||
567 | events &= ~slot_bit; | ||
568 | generic_handle_irq(slot_irq); | ||
569 | } | ||
570 | --slot_irq; | ||
571 | slot_bit >>= 1; | ||
572 | } while (events); | ||
573 | |||
574 | /* clear the CA1 interrupt and make certain there's no more. */ | ||
575 | via2[gIFR] = 0x02 | rbv_clear; | ||
576 | events = ~via2[gBufA] & 0x7F; | ||
577 | if (rbv_present) | ||
578 | events &= via2[rSIER]; | ||
579 | else | ||
580 | events &= ~via2[vDirA]; | ||
581 | } while (events); | ||
582 | return IRQ_HANDLED; | ||
583 | } | ||
584 | #endif | ||
585 | 499 | ||
586 | /* | 500 | /* |
587 | * Register the interrupt dispatchers for VIA or RBV machines only. | 501 | * Register the interrupt dispatchers for VIA or RBV machines only. |
@@ -589,7 +503,6 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id) | |||
589 | 503 | ||
590 | void __init via_register_interrupts(void) | 504 | void __init via_register_interrupts(void) |
591 | { | 505 | { |
592 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
593 | if (via_alt_mapping) { | 506 | if (via_alt_mapping) { |
594 | /* software interrupt */ | 507 | /* software interrupt */ |
595 | irq_set_chained_handler(IRQ_AUTO_1, via1_irq); | 508 | irq_set_chained_handler(IRQ_AUTO_1, via1_irq); |
@@ -600,23 +513,6 @@ void __init via_register_interrupts(void) | |||
600 | } | 513 | } |
601 | irq_set_chained_handler(IRQ_AUTO_2, via2_irq); | 514 | irq_set_chained_handler(IRQ_AUTO_2, via2_irq); |
602 | irq_set_chained_handler(IRQ_MAC_NUBUS, via_nubus_irq); | 515 | irq_set_chained_handler(IRQ_MAC_NUBUS, via_nubus_irq); |
603 | #else | ||
604 | if (via_alt_mapping) { | ||
605 | if (request_irq(IRQ_AUTO_1, via1_irq, 0, "software", | ||
606 | (void *)via1)) | ||
607 | pr_err("Couldn't register %s interrupt\n", "software"); | ||
608 | if (request_irq(IRQ_AUTO_6, via1_irq, 0, "via1", (void *)via1)) | ||
609 | pr_err("Couldn't register %s interrupt\n", "via1"); | ||
610 | } else { | ||
611 | if (request_irq(IRQ_AUTO_1, via1_irq, 0, "via1", (void *)via1)) | ||
612 | pr_err("Couldn't register %s interrupt\n", "via1"); | ||
613 | } | ||
614 | if (request_irq(IRQ_AUTO_2, via2_irq, 0, "via2", (void *)via2)) | ||
615 | pr_err("Couldn't register %s interrupt\n", "via2"); | ||
616 | if (request_irq(IRQ_MAC_NUBUS, via_nubus_irq, 0, "nubus", | ||
617 | (void *)via2)) | ||
618 | pr_err("Couldn't register %s interrupt\n", "nubus"); | ||
619 | #endif | ||
620 | } | 516 | } |
621 | 517 | ||
622 | void via_irq_enable(int irq) { | 518 | void via_irq_enable(int irq) { |