Re: booting 2.6.16-20060521 on my Macintosh Quadra 700
On Tue, May 23, 2006 at 07:22:18PM +0200, Alex Teclo wrote:
> 2006/5/23, Finn Thain <fthain@telegraphics.com.au>:
> >
> >
> >On Tue, 23 May 2006, Kars de Jong wrote:
> >
> >[snip]
> >> Finn and me debugged this back in september 2004.
> >>
> >
> >Was it that long ago!
> >
> >> You probably need the following patch from Finn Thain:
> >>
> >> [PATCH] m68k mac VIA2 fixes and cleanups
> >>
> >> http://marc.theaimsgroup.com/?l=linux-m68k&m=113923540116280&w=2
> >>
> >> It must have slipped through. Finn, do you want me to commit this patch
> >> to the Linux/m68k CVS repository?
> >
> >Please do. I've posted it to the lists once too often. Last time I did so,
> >I was expecting it would get into the mainline [1]. Since it is a
> >regression (against linux-2.2!) maybe there is still some hope for
> >inclusion in 2.6.17.
Finn, the patch does not apply cleanly because of some irq function
renaming. I cleaned that up and am building a new mac image. Updated patch
attached. There were some warnings, that do not look good:
In file included from drivers/net/macsonic.c:580:
drivers/net/sonic.c: In function `sonic_open':
drivers/net/sonic.c:96: warning: implicit declaration of function `dma_map_single'
drivers/net/sonic.c:101: warning: implicit declaration of function `dma_unmap_single'
drivers/net/macsonic.c: In function `mac_sonic_init_module':
drivers/net/macsonic.c:625: warning: passing arg 1 of `driver_unregister' from incompatible pointer type
> Thank you but how do I apply the patch ?
> With the patch command I guess but where do I get the source tree for
> 2.6.16 (anonymous cvs perhaps ?) and then how exactly should I apply
> the patch ?
I'll put a new image on the experimental page once it is done (-15).
As for where to get the source tree, I answered that already on sunday?
Checkout the debian patches from svn, but it is usually easier to start with
the source package for linux-2.6, since you don't have to create the
orig.tar.gz for yourself then. Then add patches to debian/patches/m68k-* and
add the patch name to debian/patches/series/15-extra (or whatever version
the debian package is at).
If you work with the linux-m68k CVS, just apply the patch and don't worry
how to integrate it into debian packaging. The source is still available at
http://linux-m68k-cvs.ubb.ca/
Christian
--- source-m68k-none/arch/m68k/mac/config.c.orig 2006-05-23 22:55:56.000000000 +0200
+++ source-m68k-none/arch/m68k/mac/config.c 2006-05-23 22:58:52.000000000 +0200
@@ -89,24 +89,11 @@
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
-
/*
* Parse a Macintosh-specific record in the bootinfo
*/
--- source/arch/m68k/mac/macints.c.orig 2006-03-20 06:53:29.000000000 +0100
+++ source/arch/m68k/mac/macints.c 2006-05-23 22:46:25.000000000 +0200
@@ -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 *);
--- source-m68k-none/arch/m68k/mac/via.c.orig 2006-05-23 23:03:13.000000000 +0200
+++ source-m68k-none/arch/m68k/mac/via.c 2006-05-23 23:05:43.000000000 +0200
@@ -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;
@@ -270,12 +268,6 @@
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) {
- request_irq(IRQ_AUTO_6, mac_bang, IRQ_FLG_LOCK,
- "Off Switch", mac_bang);
- }
-#endif
}
request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST,
"via2", (void *) via2);
@@ -471,8 +463,8 @@
for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1)
if (events & irq_bit) {
via2[gIER] = irq_bit;
- m68k_handle_int(VIA2_SOURCE_BASE + i, regs);
via2[gIFR] = irq_bit | rbv_clear;
+ m68k_handle_int(VIA2_SOURCE_BASE + i, regs);
via2[gIER] = irq_bit | 0x80;
}
return IRQ_HANDLED;
@@ -529,6 +521,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 +543,6 @@
}
}
}
- nubus_active |= irq_bit;
}
}
Reply to: