Kars de Jong and Bart Hartgers dug up these fixes from the mac68k repo for
me last September, and they work great ... except for one problem. This
patch kills the CUDA ADB on both the AV Quadras. The bootup locks hard at
"adb: starting probe task..."
I was going to submit this patch for the mainline, but this ADB regression
on the AV quadras is particularly unfortunate because they are the only
models with working ADB.
I vaguely recall that the CUDA ADB driver is shared with powerpc, whereas
it isn't in mac68k (no "unified ADB"), is this right?
-f
--- a/arch/m68k/mac/via.c Tue Jun 28 01:06:55 2005
+++ b/arch/m68k/mac/via.c Tue Jun 28 01:07:02 2005
@@ -437,8 +437,8 @@
for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1)
if (events & irq_bit) {
via1[vIER] = irq_bit;
- mac_do_irq_list(VIA1_SOURCE_BASE + i, regs);
via1[vIFR] = irq_bit;
+ mac_do_irq_list(VIA1_SOURCE_BASE + i, regs);
via1[vIER] = irq_bit | 0x80;
}
@@ -471,8 +471,8 @@
for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1)
if (events & irq_bit) {
via2[gIER] = irq_bit;
- mac_do_irq_list(VIA2_SOURCE_BASE + i, regs);
via2[gIFR] = irq_bit | rbv_clear;
+ mac_do_irq_list(VIA2_SOURCE_BASE + i, regs);
via2[gIER] = irq_bit | 0x80;
}
return IRQ_HANDLED;
@@ -529,6 +529,7 @@
}
via2[gIER] = irq_bit | 0x80;
} else if (irq_src == 7) {
+ nubus_active |= irq_bit;
if (rbv_present) {
/* enable the slot interrupt. SIER works like IER. */
via2[rSIER] = IER_SET_BIT(irq_idx);
@@ -550,7 +551,6 @@
}
}
}
- nubus_active |= irq_bit;
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
I think the IIfx has working ADB, but I haven't updated in a while.
> I vaguely recall that the CUDA ADB driver is shared with powerpc, whereas
> it isn't in mac68k (no "unified ADB"), is this right?
Yes, the CUDA driver is the only one that's shared with powerpc. All
powermacs have either CUDA or PMU based ADB (for those that have ADB
at all), and there is a separate pmu68k driver. The old 2.2 code was
indeed still using the separate code in arch/m68k/mac, although the
ppc code was already switched over to the new code to integrate with
the input layer in order to ease the transition to USB input.
I have to admit that I don't know how this could break CUDA that
completely. I guess our interrupt code is still not correct. The
only ADB driver that isn't insanely sensitive to interrupt
problems is the IOP driver, due to the message passing interface
it uses.
Brad Boyer
fl...@allandria.com
On Tue, 28 Jun 2005, I wrote:
>
> This patch is purely code from the mac68k repo. It is needed to make the
> mac_esp SCSI driver work (e.g. most Quadras and a few late model LCs).
>
> Kars de Jong and Bart Hartgers dug up these fixes from the mac68k repo
> for me last September, and they work great ... except for one problem.
I should correct myself here. The VIA2 change was what fixed mac_esp, but
the VIA1 change was one that I found in mac68k, and that is what broke
CUDA ADB. (As Brad pointed out, linux 2.6 has unified ADB, mac68k does
not.)
Well, mac_esp is not completely fixed, but I don't think VIA interrupts
are to blame. If the SCSI driver doesn't fail catastrophically while
detecting disks, it is rock solid thereafter (I've thrashed it on a range
of models). That failure occurs infrequently enough to be tolerable (maybe
1 in 10 boots).
BTW, CUDA ADB is partially working on my LC630. I got a few commands in
before the screen started filling up with a "stuck" keypress. It works
better on my Q660AV, but even that boots without a functioning keyboard
occasionally.
Anyway, I think the VIA2 fix needs to be merged so that VIA-style quadras
will boot (which is most of the CUDA machines). Many SONIC equipped
quadras without CUDA ADB can also be used remotely and reliably given the
sonic patch and this mac_esp/VIA2 patch.
Once again, this patch is purely code from mac68k, including a few
cleanups. ADB is unaffected.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
--- a/arch/m68k/mac/config.c Tue Jun 28 21:33:48 2005
+++ b/arch/m68k/mac/config.c Tue Jun 28 21:35:02 2005
@@ -89,23 +89,10 @@
static void mac_get_model(char *str);
-void mac_bang(int irq, void *vector, struct pt_regs *p)
-{
- printk(KERN_INFO "Resetting ...\n");
- mac_reset();
-}
-
static void mac_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *))
{
via_init_clock(vector);
}
-
-#if 0
-void mac_waitbut (void)
-{
- ;
-}
-#endif
extern irqreturn_t mac_default_handler(int, void *, struct pt_regs *);
--- a/arch/m68k/mac/macints.c Tue Jun 28 21:33:48 2005
+++ b/arch/m68k/mac/macints.c Tue Jun 28 21:35:02 2005
@@ -216,7 +216,6 @@
* console_loglevel determines NMI handler function
*/
-extern irqreturn_t mac_bang(int, void *, struct pt_regs *);
irqreturn_t mac_nmi_handler(int, void *, struct pt_regs *);
irqreturn_t mac_debug_handler(int, void *, struct pt_regs *);
--- a/arch/m68k/mac/via.c Tue Jun 28 21:33:48 2005
+++ b/arch/m68k/mac/via.c Wed Jun 29 01:55:05 2005
@@ -25,7 +25,6 @@
#include <linux/init.h>
#include <linux/ide.h>
-#include <asm/traps.h>
#include <asm/bootinfo.h>
#include <asm/macintosh.h>
#include <asm/macints.h>
@@ -71,7 +70,6 @@
void via_irq_disable(int irq);
void via_irq_clear(int irq);
-extern irqreturn_t mac_bang(int, void *, struct pt_regs *);
extern irqreturn_t mac_scc_dispatch(int, void *, struct pt_regs *);
extern int oss_present;
@@ -212,11 +210,6 @@
break;
}
#else
- /* The alernate IRQ mapping seems to just not work. Anyone with a */
- /* supported machine is welcome to take a stab at fixing it. It */
- /* _should_ work on the following Quadras: 610,650,700,800,900,950 */
- /* - 1999-06-12 (jmt) */
-
via_alt_mapping = 0;
#endif
@@ -270,12 +263,6 @@
cpu_request_irq(IRQ_AUTO_1, via1_irq,
IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1",
(void *) via1);
-#if 0 /* interferes with serial on some machines */
- if (!psc_present) {
- cpu_request_irq(IRQ_AUTO_6, mac_bang, IRQ_FLG_LOCK,
- "Off Switch", mac_bang);
- }
-#endif
}
cpu_request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST,
"via2", (void *) via2);
@@ -471,8 +458,8 @@
for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1)
if (events & irq_bit) {
via2[gIER] = irq_bit;
- mac_do_irq_list(VIA2_SOURCE_BASE + i, regs);
via2[gIFR] = irq_bit | rbv_clear;
+ mac_do_irq_list(VIA2_SOURCE_BASE + i, regs);
via2[gIER] = irq_bit | 0x80;
}
return IRQ_HANDLED;
@@ -529,6 +516,7 @@
}
via2[gIER] = irq_bit | 0x80;
} else if (irq_src == 7) {
+ nubus_active |= irq_bit;
if (rbv_present) {
/* enable the slot interrupt. SIER works like IER. */
via2[rSIER] = IER_SET_BIT(irq_idx);
@@ -550,7 +538,6 @@