diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2006-06-23 05:04:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:43:01 -0400 |
commit | 1a23989475846547e5b7ce14e77f072894aaff54 (patch) | |
tree | 8cc8726619f50ffcb62433e6548fd285da252922 | |
parent | 6d2f16a8917eb77a8b79849686159f3a5eae2501 (diff) |
[PATCH] m68k: m68k mac VIA2 fixes and cleanups
Some fixes and cleanups from the linux-mac68k repo. Fix mac_esp by clearing
the VIA2 SCSI IRQ flag before the SCSI IRQ handler is invoked. Also fix a
race condition caused by unmasking a nubus slot IRQ then setting the relevant
nubus_active bit.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/m68k/mac/config.c | 13 | ||||
-rw-r--r-- | arch/m68k/mac/macints.c | 1 | ||||
-rw-r--r-- | arch/m68k/mac/via.c | 17 |
3 files changed, 2 insertions, 29 deletions
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index 14f8d3f4e195..19dce75711b1 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c | |||
@@ -89,24 +89,11 @@ extern void mac_debugging_long(int, long); | |||
89 | 89 | ||
90 | static void mac_get_model(char *str); | 90 | static void mac_get_model(char *str); |
91 | 91 | ||
92 | void mac_bang(int irq, void *vector, struct pt_regs *p) | ||
93 | { | ||
94 | printk(KERN_INFO "Resetting ...\n"); | ||
95 | mac_reset(); | ||
96 | } | ||
97 | |||
98 | static void mac_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *)) | 92 | static void mac_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *)) |
99 | { | 93 | { |
100 | via_init_clock(vector); | 94 | via_init_clock(vector); |
101 | } | 95 | } |
102 | 96 | ||
103 | #if 0 | ||
104 | void mac_waitbut (void) | ||
105 | { | ||
106 | ; | ||
107 | } | ||
108 | #endif | ||
109 | |||
110 | extern irqreturn_t mac_default_handler(int, void *, struct pt_regs *); | 97 | extern irqreturn_t mac_default_handler(int, void *, struct pt_regs *); |
111 | 98 | ||
112 | irqreturn_t (*mac_handlers[8])(int, void *, struct pt_regs *)= | 99 | irqreturn_t (*mac_handlers[8])(int, void *, struct pt_regs *)= |
diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c index 1809601ad903..7a1600bd195d 100644 --- a/arch/m68k/mac/macints.c +++ b/arch/m68k/mac/macints.c | |||
@@ -216,7 +216,6 @@ static void scc_irq_disable(int); | |||
216 | * console_loglevel determines NMI handler function | 216 | * console_loglevel determines NMI handler function |
217 | */ | 217 | */ |
218 | 218 | ||
219 | extern irqreturn_t mac_bang(int, void *, struct pt_regs *); | ||
220 | irqreturn_t mac_nmi_handler(int, void *, struct pt_regs *); | 219 | irqreturn_t mac_nmi_handler(int, void *, struct pt_regs *); |
221 | irqreturn_t mac_debug_handler(int, void *, struct pt_regs *); | 220 | irqreturn_t mac_debug_handler(int, void *, struct pt_regs *); |
222 | 221 | ||
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index cd528bf7b43f..a6e3814c8666 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/ide.h> | 26 | #include <linux/ide.h> |
27 | 27 | ||
28 | #include <asm/traps.h> | ||
29 | #include <asm/bootinfo.h> | 28 | #include <asm/bootinfo.h> |
30 | #include <asm/macintosh.h> | 29 | #include <asm/macintosh.h> |
31 | #include <asm/macints.h> | 30 | #include <asm/macints.h> |
@@ -71,7 +70,6 @@ void via_irq_enable(int irq); | |||
71 | void via_irq_disable(int irq); | 70 | void via_irq_disable(int irq); |
72 | void via_irq_clear(int irq); | 71 | void via_irq_clear(int irq); |
73 | 72 | ||
74 | extern irqreturn_t mac_bang(int, void *, struct pt_regs *); | ||
75 | extern irqreturn_t mac_scc_dispatch(int, void *, struct pt_regs *); | 73 | extern irqreturn_t mac_scc_dispatch(int, void *, struct pt_regs *); |
76 | extern int oss_present; | 74 | extern int oss_present; |
77 | 75 | ||
@@ -212,11 +210,6 @@ void __init via_init(void) | |||
212 | break; | 210 | break; |
213 | } | 211 | } |
214 | #else | 212 | #else |
215 | /* The alernate IRQ mapping seems to just not work. Anyone with a */ | ||
216 | /* supported machine is welcome to take a stab at fixing it. It */ | ||
217 | /* _should_ work on the following Quadras: 610,650,700,800,900,950 */ | ||
218 | /* - 1999-06-12 (jmt) */ | ||
219 | |||
220 | via_alt_mapping = 0; | 213 | via_alt_mapping = 0; |
221 | #endif | 214 | #endif |
222 | 215 | ||
@@ -270,12 +263,6 @@ void __init via_register_interrupts(void) | |||
270 | cpu_request_irq(IRQ_AUTO_1, via1_irq, | 263 | cpu_request_irq(IRQ_AUTO_1, via1_irq, |
271 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", | 264 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", |
272 | (void *) via1); | 265 | (void *) via1); |
273 | #if 0 /* interferes with serial on some machines */ | ||
274 | if (!psc_present) { | ||
275 | cpu_request_irq(IRQ_AUTO_6, mac_bang, IRQ_FLG_LOCK, | ||
276 | "Off Switch", mac_bang); | ||
277 | } | ||
278 | #endif | ||
279 | } | 266 | } |
280 | cpu_request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, | 267 | cpu_request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, |
281 | "via2", (void *) via2); | 268 | "via2", (void *) via2); |
@@ -471,8 +458,8 @@ irqreturn_t via2_irq(int irq, void *dev_id, struct pt_regs *regs) | |||
471 | for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1) | 458 | for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1) |
472 | if (events & irq_bit) { | 459 | if (events & irq_bit) { |
473 | via2[gIER] = irq_bit; | 460 | via2[gIER] = irq_bit; |
474 | mac_do_irq_list(VIA2_SOURCE_BASE + i, regs); | ||
475 | via2[gIFR] = irq_bit | rbv_clear; | 461 | via2[gIFR] = irq_bit | rbv_clear; |
462 | mac_do_irq_list(VIA2_SOURCE_BASE + i, regs); | ||
476 | via2[gIER] = irq_bit | 0x80; | 463 | via2[gIER] = irq_bit | 0x80; |
477 | } | 464 | } |
478 | return IRQ_HANDLED; | 465 | return IRQ_HANDLED; |
@@ -529,6 +516,7 @@ void via_irq_enable(int irq) { | |||
529 | } | 516 | } |
530 | via2[gIER] = irq_bit | 0x80; | 517 | via2[gIER] = irq_bit | 0x80; |
531 | } else if (irq_src == 7) { | 518 | } else if (irq_src == 7) { |
519 | nubus_active |= irq_bit; | ||
532 | if (rbv_present) { | 520 | if (rbv_present) { |
533 | /* enable the slot interrupt. SIER works like IER. */ | 521 | /* enable the slot interrupt. SIER works like IER. */ |
534 | via2[rSIER] = IER_SET_BIT(irq_idx); | 522 | via2[rSIER] = IER_SET_BIT(irq_idx); |
@@ -550,7 +538,6 @@ void via_irq_enable(int irq) { | |||
550 | } | 538 | } |
551 | } | 539 | } |
552 | } | 540 | } |
553 | nubus_active |= irq_bit; | ||
554 | } | 541 | } |
555 | } | 542 | } |
556 | 543 | ||