diff options
Diffstat (limited to 'arch/m68k/q40/q40ints.c')
-rw-r--r-- | arch/m68k/q40/q40ints.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c index fa05a03f8dfe..cb245f972e1a 100644 --- a/arch/m68k/q40/q40ints.c +++ b/arch/m68k/q40/q40ints.c | |||
@@ -35,14 +35,16 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | static void q40_irq_handler(unsigned int, struct pt_regs *fp); | 37 | static void q40_irq_handler(unsigned int, struct pt_regs *fp); |
38 | static void q40_enable_irq(unsigned int); | 38 | static void q40_irq_enable(struct irq_data *data); |
39 | static void q40_disable_irq(unsigned int); | 39 | static void q40_irq_disable(struct irq_data *data); |
40 | 40 | ||
41 | unsigned short q40_ablecount[35]; | 41 | unsigned short q40_ablecount[35]; |
42 | unsigned short q40_state[35]; | 42 | unsigned short q40_state[35]; |
43 | 43 | ||
44 | static unsigned int q40_irq_startup(unsigned int irq) | 44 | static unsigned int q40_irq_startup(struct irq_data *data) |
45 | { | 45 | { |
46 | unsigned int irq = data->irq; | ||
47 | |||
46 | /* test for ISA ints not implemented by HW */ | 48 | /* test for ISA ints not implemented by HW */ |
47 | switch (irq) { | 49 | switch (irq) { |
48 | case 1: case 2: case 8: case 9: | 50 | case 1: case 2: case 8: case 9: |
@@ -53,7 +55,7 @@ static unsigned int q40_irq_startup(unsigned int irq) | |||
53 | return 0; | 55 | return 0; |
54 | } | 56 | } |
55 | 57 | ||
56 | static void q40_irq_shutdown(unsigned int irq) | 58 | static void q40_irq_shutdown(struct irq_data *data) |
57 | { | 59 | { |
58 | } | 60 | } |
59 | 61 | ||
@@ -61,8 +63,8 @@ static struct irq_chip q40_irq_chip = { | |||
61 | .name = "q40", | 63 | .name = "q40", |
62 | .irq_startup = q40_irq_startup, | 64 | .irq_startup = q40_irq_startup, |
63 | .irq_shutdown = q40_irq_shutdown, | 65 | .irq_shutdown = q40_irq_shutdown, |
64 | .irq_enable = q40_enable_irq, | 66 | .irq_enable = q40_irq_enable, |
65 | .irq_disable = q40_disable_irq, | 67 | .irq_disable = q40_irq_disable, |
66 | }; | 68 | }; |
67 | 69 | ||
68 | /* | 70 | /* |
@@ -85,8 +87,8 @@ void __init q40_init_IRQ(void) | |||
85 | /* setup handler for ISA ints */ | 87 | /* setup handler for ISA ints */ |
86 | m68k_setup_auto_interrupt(q40_irq_handler); | 88 | m68k_setup_auto_interrupt(q40_irq_handler); |
87 | 89 | ||
88 | m68k_irq_startup(IRQ_AUTO_2); | 90 | m68k_irq_startup_irq(IRQ_AUTO_2); |
89 | m68k_irq_startup(IRQ_AUTO_4); | 91 | m68k_irq_startup_irq(IRQ_AUTO_4); |
90 | 92 | ||
91 | /* now enable some ints.. */ | 93 | /* now enable some ints.. */ |
92 | master_outb(1, EXT_ENABLE_REG); /* ISA IRQ 5-15 */ | 94 | master_outb(1, EXT_ENABLE_REG); /* ISA IRQ 5-15 */ |
@@ -292,20 +294,24 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp) | |||
292 | return; | 294 | return; |
293 | } | 295 | } |
294 | 296 | ||
295 | void q40_enable_irq(unsigned int irq) | 297 | void q40_irq_enable(struct irq_data *data) |
296 | { | 298 | { |
299 | unsigned int irq = data->irq; | ||
300 | |||
297 | if (irq >= 5 && irq <= 15) { | 301 | if (irq >= 5 && irq <= 15) { |
298 | mext_disabled--; | 302 | mext_disabled--; |
299 | if (mext_disabled > 0) | 303 | if (mext_disabled > 0) |
300 | printk("q40_enable_irq : nested disable/enable\n"); | 304 | printk("q40_irq_enable : nested disable/enable\n"); |
301 | if (mext_disabled == 0) | 305 | if (mext_disabled == 0) |
302 | master_outb(1, EXT_ENABLE_REG); | 306 | master_outb(1, EXT_ENABLE_REG); |
303 | } | 307 | } |
304 | } | 308 | } |
305 | 309 | ||
306 | 310 | ||
307 | void q40_disable_irq(unsigned int irq) | 311 | void q40_irq_disable(struct irq_data *data) |
308 | { | 312 | { |
313 | unsigned int irq = data->irq; | ||
314 | |||
309 | /* disable ISA iqs : only do something if the driver has been | 315 | /* disable ISA iqs : only do something if the driver has been |
310 | * verified to be Q40 "compatible" - right now IDE, NE2K | 316 | * verified to be Q40 "compatible" - right now IDE, NE2K |
311 | * Any driver should not attempt to sleep across disable_irq !! | 317 | * Any driver should not attempt to sleep across disable_irq !! |