Subject: Re: kernel
To: Rainer Doemer <rainer@pv915.pv.reshsg.uci.edu>
From: Ignatios Souvatzis <is@jocelyn.rhein.de>
List: port-amiga
Date: 01/01/1999 11:58:35
On Thu, Dec 31, 1998 at 05:54:29PM +0000, Rainer Doemer wrote:
> 
> > The feature addition file (I refuse to name it "fix") is
> > 
> > ftp.netbsd.org:/pub/NetBSD/arch/amiga/misc/apollodiffs
> > ftp.de.netbsd.org:/pub/NetBSD/arch/amiga/misc/apollodiffs
> > 
> > If it does not apply cleanly... find out where the conflict is, and apply
> > the diff manually.
> 
> Your "feature addition file" did apply cleanly to the NetBSD 1.3.3
> sources. However, when compiling the file ahsc.c, I got the following
> error:
> [...]
> .../../../../arch/amiga/dev/ahsc.c: In function `ahscattach':
> .../../../../arch/amiga/dev/ahsc.c:139: structure has no member named `sc_sbicp'
> *** Error code 1

Ok. After applying the diffs myself, and checking the result, I found that
ahsc.c was unchanged. I must have forgotten to add that diff to the big
patch file. Find it below.

Rainer: uncomment the line you commented, and apply the patch from this
mail, before make'ing anew.

I'll upgrade the diff file on the servers in a few minutes.

Regards,
	Ignatios


Index: ahsc.c
===================================================================
RCS file: /cvsroot/src/sys/arch/amiga/dev/ahsc.c,v
retrieving revision 1.20
retrieving revision 1.22
diff -u -r1.20 -r1.22
--- ahsc.c	1998/01/12 10:39:08	1.20
+++ ahsc.c	1998/09/04 22:00:27	1.22
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahsc.c,v 1.20 1998/01/12 10:39:08 thorpej Exp $	*/
+/*	$NetBSD: ahsc.c,v 1.22 1998/09/04 22:00:27 is Exp $	*/
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -44,6 +44,7 @@
 #include <dev/scsipi/scsiconf.h>
 #include <amiga/amiga/custom.h>
 #include <amiga/amiga/cc.h>
+#include <amiga/amiga/cfdev.h>
 #include <amiga/amiga/device.h>
 #include <amiga/amiga/isr.h>
 #include <amiga/dev/dmavar.h>
@@ -112,8 +113,15 @@
 {
 	volatile struct sdmac *rp;
 	struct sbic_softc *sc;
+	struct cfdev *cdp, *ecdp;
+
+	ecdp = &cfdev[ncfdev];
 	
-	printf("\n");
+	for (cdp = cfdev; cdp < ecdp; cdp++) {
+		if (cdp->rom.manid == 8738 && 
+		    cdp->rom.prodid == 35)
+				break;
+	}
 
 	sc = (struct sbic_softc *)dp;
 	sc->sc_cregs = rp = ztwomap(0xdd0000);
@@ -132,7 +140,17 @@
 	 * eveything is a valid dma address
 	 */
 	sc->sc_dmamask = 0;
-	sc->sc_sbicp = (sbic_regmap_p) ((int)rp + 0x41);
+
+	if (cdp < ecdp) {
+		sc->sc_sbic.sbic_asr_p =  ((vu_char *)rp + 0x43);
+		sc->sc_sbic.sbic_value_p =  ((vu_char *)rp + 0x47);
+		printf(": modified for Apollo cpu board\n");
+	} else {
+		sc->sc_sbic.sbic_asr_p =  ((vu_char *)rp + 0x41);
+		sc->sc_sbic.sbic_value_p =  ((vu_char *)rp + 0x43);
+		printf("\n");
+	}
+
 	sc->sc_clkfreq = sbic_clock_override ? sbic_clock_override : 143;
 	
 	sc->sc_link.scsipi_scsi.channel = SCSI_CHANNEL_ONLY_ONE;

END OF PATCH.