diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-09-03 16:30:56 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-09-03 16:30:56 +0000 |
commit | 8a6d19614c85cb6a06e60488133d90f96b0daae0 (patch) | |
tree | 1abda441da4af4bb6f1ede994a7ce6d2f3f1d43c | |
parent | f1cf22ccbd0be0523c1c5b4ac1d8b01e499ab1e3 (diff) |
aic at isapnp, from anders@Arnholm.nu w/ fixes from me
-rw-r--r-- | sys/arch/i386/conf/GENERIC | 3 | ||||
-rw-r--r-- | sys/conf/files | 4 | ||||
-rw-r--r-- | sys/dev/isa/aic_isapnp.c | 98 | ||||
-rw-r--r-- | sys/dev/isa/files.isapnp | 5 | ||||
-rw-r--r-- | sys/dev/isa/pnpdevs | 3 |
5 files changed, 108 insertions, 5 deletions
diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC index 7a0a01a1a0e..6fe1c45aea5 100644 --- a/sys/arch/i386/conf/GENERIC +++ b/sys/arch/i386/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.316 2002/08/28 21:20:48 mickey Exp $ +# $OpenBSD: GENERIC,v 1.317 2002/09/03 16:30:54 mickey Exp $ # $NetBSD: GENERIC,v 1.48 1996/05/20 18:17:23 mrg Exp $ # # GENERIC -- everything that's currently supported @@ -231,6 +231,7 @@ isp* at pci? dev ? function ? # Qlogic ISP [12]0x0 SCSI/FibreChannel scsibus* at isp? aic0 at isa? port 0x340 irq 11 # Adaptec 152[02] SCSI controllers aic* at pcmcia? function ? # PCMCIA based aic SCSI controllers +aic* at isapnp? # isapnp configured aic SCSI controllers scsibus* at aic? #esp* at pcmcia? function ? # PCMCIA based NCR 53C9X SCSI #scsibus* at esp? diff --git a/sys/conf/files b/sys/conf/files index 28696050584..eea613f9134 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,4 +1,4 @@ -# $OpenBSD: files,v 1.256 2002/07/06 19:14:20 nordin Exp $ +# $OpenBSD: files,v 1.257 2002/09/03 16:30:54 mickey Exp $ # $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 @@ -110,7 +110,7 @@ file dev/ic/smc93cx6.c ahc # Adaptec AIC-6[23]60 SCSI controllers device aic: scsi -file dev/ic/aic6360.c aic +file dev/ic/aic6360.c aic & (aic_isa | aic_pcmcia | aic_isapnp) # DPT EATA SCSI controllers device dpt: scsi diff --git a/sys/dev/isa/aic_isapnp.c b/sys/dev/isa/aic_isapnp.c new file mode 100644 index 00000000000..ec1a20444ed --- /dev/null +++ b/sys/dev/isa/aic_isapnp.c @@ -0,0 +1,98 @@ +/* $OpenBSD: aic_isapnp.c,v 1.1 2002/09/03 16:30:55 mickey Exp $ */ + +/* + * Copyright (c) 2002 Anders Arnholm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Acknowledgements: Many of the algorithms used in this driver are + * inspired by the work of Julian Elischer (julian@tfs.com), + * Charles Hannum (mycroft@duality.gnu.ai.mit.edu) and Jarle Greipsland. + * Thanks a million! + */ + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/device.h> + +#include <machine/bus.h> + +#include <scsi/scsi_all.h> +#include <scsi/scsiconf.h> + +#include <dev/isa/isavar.h> + +#include <dev/ic/aic6360var.h> + +int aic_isapnp_match(struct device *, void *, void *); +void aic_isapnp_attach(struct device *, struct device *, void *); + +struct cfattach aic_isapnp_ca = { + sizeof(struct aic_softc), aic_isapnp_match, aic_isapnp_attach +}; + +/* + * INITIALIZATION ROUTINES (match, attach ++) + */ +/* + * aic_isapnp_match: isapnp code does the probing for us, and other configured + * and other configured card are found by aic_isa_match + */ +int +aic_isapnp_match(parent, match, aux) + struct device *parent; + void *match, *aux; +{ + AIC_TRACE(("aic: aic_isapnp_match\n")); + return(1); +} + +/* + * Attach the AIC6360, takes the data from isapnp and feads into aicattach. + */ +void +aic_isapnp_attach(parent, self, aux) + struct device *parent, *self; + void *aux; +{ + struct aic_softc *sc = (void *)self; + struct isa_attach_args *ia = aux; + + AIC_TRACE(("aic: aic_isapnp_attach\n")); + + sc->sc_iot = ia->ia_iot; + sc->sc_ioh = ia->ia_ioh; + sc->sc_irq = ia->ia_irq; + sc->sc_drq = ia->ia_drq; + + AIC_TRACE(("aic: aic_isapnp_attach isa_intr_establish(...)\n")); + sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE, + IPL_BIO, aicintr, sc, sc->sc_dev.dv_xname); + AIC_TRACE(("aic: aic_isapnp_attach aicattach(0x%08x, 0x%08x, %d, %d)\n", + sc->sc_iot, sc->sc_ioh, sc->sc_irq, sc->sc_drq)); + aicattach(sc); +} diff --git a/sys/dev/isa/files.isapnp b/sys/dev/isa/files.isapnp index c78bb8eafbc..3030ce2425a 100644 --- a/sys/dev/isa/files.isapnp +++ b/sys/dev/isa/files.isapnp @@ -1,4 +1,4 @@ -# $OpenBSD: files.isapnp,v 1.24 2002/08/28 21:20:48 mickey Exp $ +# $OpenBSD: files.isapnp,v 1.25 2002/09/03 16:30:55 mickey Exp $ # $NetBSD: files.isapnp,v 1.7 1997/10/16 17:16:36 matt Exp $ # # Config file and device description for machine-independent ISAPnP code. @@ -29,6 +29,9 @@ file dev/isa/wdc_isapnp.c wdc_isapnp attach aha at isapnp with aha_isapnp +attach aic at isapnp with aic_isapnp +file dev/isa/aic_isapnp.c aic_isapnp + attach sb at isapnp with sb_isapnp file dev/isa/sb_isapnp.c sb_isapnp needs-flag diff --git a/sys/dev/isa/pnpdevs b/sys/dev/isa/pnpdevs index 79a3925da8f..e79933a920f 100644 --- a/sys/dev/isa/pnpdevs +++ b/sys/dev/isa/pnpdevs @@ -1,4 +1,4 @@ -# $OpenBSD: pnpdevs,v 1.107 2002/08/28 21:20:48 mickey Exp $ +# $OpenBSD: pnpdevs,v 1.108 2002/09/03 16:30:55 mickey Exp $ # # NOTE: All `com' devices also need pccom identifiers. @@ -14,6 +14,7 @@ #--Adaptec SCSI-- #aha ADP1542 # Adaptec AHA-154x series (PNP00A0) aha PNP00A0 # Adaptec AHA-154x series +aic ADP1502 # Adaptec AHA-152x series aic ADP1520 # Adaptec AHA-152x series aic ADP2015 # Adaptec AHA-1530P |