Add aic to the list of drivers that might work with NEWCARD. I've added

the same config lines that NetBSD has.  This builds with both NEWCARD
and GENERIC config files.
This commit is contained in:
imp 2001-01-08 01:59:15 +00:00
parent fdfcab0fe1
commit 4b312a545c
3 changed files with 45 additions and 7 deletions

View File

@ -219,6 +219,7 @@ dev/aha/aha_mca.c optional aha mca
dev/ahb/ahb.c optional ahb eisa
dev/aic/aic.c optional aic
dev/aic/aic_pccard.c optional aic card
dev/aic/aic_pccard.c optional aic pccard
dev/aic7xxx/aic7770.c optional ahc eisa
dev/aic7xxx/ahc_eisa.c optional ahc eisa
#dev/aic7xxx/ahc_isa.c optional ahc isa

View File

@ -37,6 +37,10 @@
#include <sys/rman.h>
#include <dev/aic/aicvar.h>
#include <dev/pccard/pccardvar.h>
#include <dev/pccard/pccarddevs.h>
#include "card_if.h"
struct aic_pccard_softc {
struct aic_softc sc_aic;
@ -45,10 +49,24 @@ struct aic_pccard_softc {
void *sc_ih;
};
static int aic_pccard_alloc_resources __P((device_t));
static void aic_pccard_release_resources __P((device_t));
static int aic_pccard_probe __P((device_t));
static int aic_pccard_attach __P((device_t));
static int aic_pccard_alloc_resources(device_t);
static void aic_pccard_release_resources(device_t);
static int aic_pccard_match(device_t);
static int aic_pccard_probe(device_t);
static int aic_pccard_attach(device_t);
const struct pccard_product aic_pccard_products[] = {
{ PCCARD_STR_ADAPTEC_APA1460, PCCARD_VENDOR_ADAPTEC,
PCCARD_PRODUCT_ADAPTEC_APA1460, 0, NULL, NULL },
{ PCCARD_STR_ADAPTEC_APA1460A, PCCARD_VENDOR_ADAPTEC,
PCCARD_PRODUCT_ADAPTEC_APA1460A, 0, NULL, NULL },
{ PCCARD_STR_NEWMEDIA_BUSTOASTER, PCCARD_VENDOR_NEWMEDIA,
PCCARD_PRODUCT_NEWMEDIA_BUSTOASTER, 0, NULL, NULL },
{ NULL }
};
#define AIC_PCCARD_PORTSIZE 0x20
@ -92,6 +110,19 @@ aic_pccard_release_resources(device_t dev)
sc->sc_port = sc->sc_irq = 0;
}
static int
aic_pccard_match(device_t dev)
{
const struct pccard_product *pp;
if ((pp = pccard_product_lookup(dev, aic_pccard_products,
sizeof(aic_pccard_products[0]), NULL)) != NULL) {
device_set_desc(dev, pp->pp_name);
return 0;
}
return EIO;
}
static int
aic_pccard_probe(device_t dev)
{
@ -164,9 +195,15 @@ aic_pccard_detach(device_t dev)
static device_method_t aic_pccard_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, aic_pccard_probe),
DEVMETHOD(device_attach, aic_pccard_attach),
DEVMETHOD(device_probe, pccard_compat_probe),
DEVMETHOD(device_attach, pccard_compat_attach),
DEVMETHOD(device_detach, aic_pccard_detach),
/* Card interface */
DEVMETHOD(card_compat_match, aic_pccard_match),
DEVMETHOD(card_compat_probe, aic_pccard_probe),
DEVMETHOD(card_compat_attach, aic_pccard_attach),
{ 0, 0 }
};

View File

@ -4,7 +4,7 @@
KMOD= aic
SRCS= aic.c aic_pccard.c
SRCS+= opt_bdg.h device_if.h bus_if.h pci_if.h isa_if.h
SRCS+= opt_bdg.h device_if.h bus_if.h pci_if.h isa_if.h card_if.h
SRCS+= opt_cam.h opt_scsi.h
.if ${MACHINE} == "pc98"