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.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index 2a96bebd8969..b403924a1cad 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -11,6 +11,7 @@
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/delay.h> 12#include <linux/delay.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/irq.h>
14 15
15#include <asm/traps.h> 16#include <asm/traps.h>
16#include <asm/bootinfo.h> 17#include <asm/bootinfo.h>
@@ -20,9 +21,6 @@
20 21
21/* #define DEBUG_IRQS */ 22/* #define DEBUG_IRQS */
22 23
23extern void mac_enable_irq(unsigned int);
24extern void mac_disable_irq(unsigned int);
25
26int baboon_present; 24int baboon_present;
27static volatile struct baboon *baboon; 25static volatile struct baboon *baboon;
28static unsigned char baboon_disabled; 26static unsigned char baboon_disabled;
@@ -53,7 +51,7 @@ void __init baboon_init(void)
53 * Baboon interrupt handler. This works a lot like a VIA. 51 * Baboon interrupt handler. This works a lot like a VIA.
54 */ 52 */
55 53
56static irqreturn_t baboon_irq(int irq, void *dev_id) 54static void baboon_irq(unsigned int irq, struct irq_desc *desc)
57{ 55{
58 int irq_bit, irq_num; 56 int irq_bit, irq_num;
59 unsigned char events; 57 unsigned char events;
@@ -64,15 +62,16 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)
64 (uint) baboon->mb_status); 62 (uint) baboon->mb_status);
65#endif 63#endif
66 64
67 if (!(events = baboon->mb_ifr & 0x07)) 65 events = baboon->mb_ifr & 0x07;
68 return IRQ_NONE; 66 if (!events)
67 return;
69 68
70 irq_num = IRQ_BABOON_0; 69 irq_num = IRQ_BABOON_0;
71 irq_bit = 1; 70 irq_bit = 1;
72 do { 71 do {
73 if (events & irq_bit) { 72 if (events & irq_bit) {
74 baboon->mb_ifr &= ~irq_bit; 73 baboon->mb_ifr &= ~irq_bit;
75 m68k_handle_int(irq_num); 74 generic_handle_irq(irq_num);
76 } 75 }
77 irq_bit <<= 1; 76 irq_bit <<= 1;
78 irq_num++; 77 irq_num++;
@@ -82,7 +81,6 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)
82 /* for now we need to smash all interrupts */ 81 /* for now we need to smash all interrupts */
83 baboon->mb_ifr &= ~events; 82 baboon->mb_ifr &= ~events;
84#endif 83#endif
85 return IRQ_HANDLED;
86} 84}
87 85
88/* 86/*
@@ -92,8 +90,7 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)
92void __init baboon_register_interrupts(void) 90void __init baboon_register_interrupts(void)
93{ 91{
94 baboon_disabled = 0; 92 baboon_disabled = 0;
95 if (request_irq(IRQ_NUBUS_C, baboon_irq, 0, "baboon", (void *)baboon)) 93 irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq);
96 pr_err("Couldn't register baboon interrupt\n");
97} 94}
98 95
99/* 96/*
@@ -111,7 +108,7 @@ void baboon_irq_enable(int irq)
111 108
112 baboon_disabled &= ~(1 << irq_idx); 109 baboon_disabled &= ~(1 << irq_idx);
113 if (!baboon_disabled) 110 if (!baboon_disabled)
114 mac_enable_irq(IRQ_NUBUS_C); 111 mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C));
115} 112}
116 113
117void baboon_irq_disable(int irq) 114void baboon_irq_disable(int irq)
@@ -124,7 +121,7 @@ void baboon_irq_disable(int irq)
124 121
125 baboon_disabled |= 1 << irq_idx; 122 baboon_disabled |= 1 << irq_idx;
126 if (baboon_disabled) 123 if (baboon_disabled)
127 mac_disable_irq(IRQ_NUBUS_C); 124 mac_irq_disable(irq_get_irq_data(IRQ_NUBUS_C));
128} 125}
129 126
130void baboon_irq_clear(int irq) 127void baboon_irq_clear(int irq)