aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/mac/baboon.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/mac/baboon.c')
-rw-r--r--arch/m68k/mac/baboon.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index 8ea7498cec37..673a1085984d 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -22,7 +22,7 @@
22/* #define DEBUG_BABOON */ 22/* #define DEBUG_BABOON */
23/* #define DEBUG_IRQS */ 23/* #define DEBUG_IRQS */
24 24
25int baboon_present,baboon_active; 25int baboon_present;
26volatile struct baboon *baboon; 26volatile struct baboon *baboon;
27 27
28irqreturn_t baboon_irq(int, void *); 28irqreturn_t baboon_irq(int, void *);
@@ -45,7 +45,6 @@ void __init baboon_init(void)
45 45
46 baboon = (struct baboon *) BABOON_BASE; 46 baboon = (struct baboon *) BABOON_BASE;
47 baboon_present = 1; 47 baboon_present = 1;
48 baboon_active = 0;
49 48
50 printk("Baboon detected at %p\n", baboon); 49 printk("Baboon detected at %p\n", baboon);
51} 50}
@@ -70,9 +69,9 @@ irqreturn_t baboon_irq(int irq, void *dev_id)
70 unsigned char events; 69 unsigned char events;
71 70
72#ifdef DEBUG_IRQS 71#ifdef DEBUG_IRQS
73 printk("baboon_irq: mb_control %02X mb_ifr %02X mb_status %02X active %02X\n", 72 printk("baboon_irq: mb_control %02X mb_ifr %02X mb_status %02X\n",
74 (uint) baboon->mb_control, (uint) baboon->mb_ifr, 73 (uint) baboon->mb_control, (uint) baboon->mb_ifr,
75 (uint) baboon->mb_status, baboon_active); 74 (uint) baboon->mb_status);
76#endif 75#endif
77 76
78 if (!(events = baboon->mb_ifr & 0x07)) 77 if (!(events = baboon->mb_ifr & 0x07))
@@ -81,11 +80,9 @@ irqreturn_t baboon_irq(int irq, void *dev_id)
81 irq_num = IRQ_BABOON_0; 80 irq_num = IRQ_BABOON_0;
82 irq_bit = 1; 81 irq_bit = 1;
83 do { 82 do {
84 if (events & irq_bit/* & baboon_active*/) { 83 if (events & irq_bit) {
85 baboon_active &= ~irq_bit;
86 baboon->mb_ifr &= ~irq_bit; 84 baboon->mb_ifr &= ~irq_bit;
87 m68k_handle_int(irq_num); 85 m68k_handle_int(irq_num);
88 baboon_active |= irq_bit;
89 } 86 }
90 irq_bit <<= 1; 87 irq_bit <<= 1;
91 irq_num++; 88 irq_num++;
@@ -99,21 +96,18 @@ irqreturn_t baboon_irq(int irq, void *dev_id)
99} 96}
100 97
101void baboon_irq_enable(int irq) { 98void baboon_irq_enable(int irq) {
102 int irq_idx = IRQ_IDX(irq);
103
104#ifdef DEBUG_IRQUSE 99#ifdef DEBUG_IRQUSE
105 printk("baboon_irq_enable(%d)\n", irq); 100 printk("baboon_irq_enable(%d)\n", irq);
106#endif 101#endif
107 baboon_active |= (1 << irq_idx); 102 /* FIXME: figure out how to mask and unmask baboon interrupt sources */
103 enable_irq(IRQ_NUBUS_C);
108} 104}
109 105
110void baboon_irq_disable(int irq) { 106void baboon_irq_disable(int irq) {
111 int irq_idx = IRQ_IDX(irq);
112
113#ifdef DEBUG_IRQUSE 107#ifdef DEBUG_IRQUSE
114 printk("baboon_irq_disable(%d)\n", irq); 108 printk("baboon_irq_disable(%d)\n", irq);
115#endif 109#endif
116 baboon_active &= ~(1 << irq_idx); 110 disable_irq(IRQ_NUBUS_C);
117} 111}
118 112
119void baboon_irq_clear(int irq) { 113void baboon_irq_clear(int irq) {