- pcidevs: add 3c590 and adaptec ultra
- aic7xxx.c: fix the probe routines to use pcidevs.h
This commit is contained in:
parent
c0aaa86553
commit
c3ae59171a
@ -19,7 +19,7 @@
|
||||
* 4. Modifications may be freely made to this file if the above conditions
|
||||
* are met.
|
||||
*
|
||||
* $Id: aic7870.c,v 1.1 1995/10/09 09:49:33 mycroft Exp $
|
||||
* $Id: aic7870.c,v 1.2 1995/11/10 19:36:08 christos Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -33,16 +33,17 @@
|
||||
|
||||
#include <dev/pci/pcireg.h>
|
||||
#include <dev/pci/pcivar.h>
|
||||
#include <dev/pci/pcidevs.h>
|
||||
|
||||
#include <dev/ic/aic7xxxvar.h>
|
||||
|
||||
|
||||
#define PCI_BASEADR0 PCI_MAP_REG_START
|
||||
#define PCI_DEVICE_ID_ADAPTEC_2940 0x71789004ul
|
||||
#define PCI_DEVICE_ID_ADAPTEC_AIC7870 0x70789004ul
|
||||
#define PCI_BASEADR0 PCI_MAP_REG_START
|
||||
#define PCI_VENDORID(x) ((x) & 0xFFFF)
|
||||
#define PCI_CHIPID(x) (((x) >> 16) & 0xFFFF)
|
||||
|
||||
|
||||
static int aic7870_probe();
|
||||
static void aic7870_attach();
|
||||
static int aic7870_probe __P((struct device *, void *, void *));
|
||||
static void aic7870_attach __P((struct device *, struct device *, void *));
|
||||
|
||||
struct cfdriver ahccd = {
|
||||
NULL, "ahc", aic7870_probe, aic7870_attach, DV_DULL,
|
||||
@ -58,12 +59,24 @@ aic7870_probe(parent, match, aux)
|
||||
void *match, *aux;
|
||||
{
|
||||
struct pci_attach_args *pa = aux;
|
||||
struct ahc_softc *ahc = match;
|
||||
|
||||
if (pa->pa_id != PCI_DEVICE_ID_ADAPTEC_2940 &&
|
||||
pa->pa_id != PCI_DEVICE_ID_ADAPTEC_AIC7870)
|
||||
return (0);
|
||||
if (PCI_VENDORID(pa->pa_id) != PCI_VENDOR_ADP)
|
||||
return 0;
|
||||
|
||||
return (1);
|
||||
switch (PCI_CHIPID(pa->pa_id)) {
|
||||
case PCI_PRODUCT_ADP_AIC7870:
|
||||
ahc->type = AHC_AIC7870;
|
||||
return 1;
|
||||
|
||||
case PCI_PRODUCT_ADP_AIC2940:
|
||||
case PCI_PRODUCT_ADP_AIC2940U:
|
||||
ahc->type = AHC_294;
|
||||
return 1;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -75,15 +88,6 @@ aic7870_attach(parent, self, aux)
|
||||
struct ahc_softc *ahc = (void *)self;
|
||||
int iobase;
|
||||
|
||||
switch (pa->pa_id) {
|
||||
case PCI_DEVICE_ID_ADAPTEC_2940:
|
||||
ahc->type = AHC_294;
|
||||
break;
|
||||
case PCI_DEVICE_ID_ADAPTEC_AIC7870:
|
||||
ahc->type = AHC_AIC7870;
|
||||
break;
|
||||
}
|
||||
|
||||
if (pci_map_io(pa->pa_tag, PCI_BASEADR0, &iobase))
|
||||
return;
|
||||
|
||||
@ -98,4 +102,4 @@ aic7870_attach(parent, self, aux)
|
||||
ahcattach(ahc);
|
||||
|
||||
ahc->sc_ih = pci_map_int(pa->pa_tag, PCI_IPL_BIO, ahcintr, ahc);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
$NetBSD: pcidevs,v 1.2 1995/06/20 04:50:43 cgd Exp $
|
||||
$NetBSD: pcidevs,v 1.3 1995/11/10 19:36:09 christos Exp $
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Christopher G. Demetriou
|
||||
@ -70,7 +70,10 @@ vendor ADP 0x9004 Adaptec
|
||||
*/
|
||||
|
||||
/* Adaptec products */
|
||||
product ADP AIC7850 0x7075 UNSUPP AIC-7850
|
||||
product ADP AIC7870 0x7078 UNSUPP AIC-7870
|
||||
product ADP AIC2940 0x7178 UNSUPP AIC-2940
|
||||
product ADP AIC2940U 0x8178 UNSUPP AIC-2940 (\"Ultra\")
|
||||
|
||||
/* ATI products */
|
||||
product ATI MACH32 0x4158 UNSUPP Mach32
|
||||
@ -115,3 +118,6 @@ product QLOGIC ISP1020 0x1020 UNSUPP ISP1020
|
||||
|
||||
/* S3 Products */
|
||||
product S3 VISION864 0x88c0 UNSUPP Vision 864
|
||||
|
||||
/* 3COM Products */
|
||||
product 3COM 3C590 0x5900 3c590
|
||||
|
@ -2,7 +2,7 @@
|
||||
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
*
|
||||
* generated from:
|
||||
* NetBSD: pcidevs,v 1.1 1995/06/18 01:07:06 cgd Exp
|
||||
* NetBSD: pcidevs,v 1.2 1995/06/20 04:50:43 cgd Exp
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -75,7 +75,10 @@
|
||||
*/
|
||||
|
||||
/* Adaptec products */
|
||||
#define PCI_PRODUCT_ADP_AIC7850 0x7075 /* AIC-7850 */
|
||||
#define PCI_PRODUCT_ADP_AIC7870 0x7078 /* AIC-7870 */
|
||||
#define PCI_PRODUCT_ADP_AIC2940 0x7178 /* AIC-2940 */
|
||||
#define PCI_PRODUCT_ADP_AIC2940U 0x8178 /* AIC-2940 (\"Ultra\") */
|
||||
|
||||
/* ATI products */
|
||||
#define PCI_PRODUCT_ATI_MACH32 0x4158 /* Mach32 */
|
||||
@ -120,3 +123,6 @@
|
||||
|
||||
/* S3 Products */
|
||||
#define PCI_PRODUCT_S3_VISION864 0x88c0 /* Vision 864 */
|
||||
|
||||
/* 3COM Products */
|
||||
#define PCI_PRODUCT_3COM_3C590 0x5900 /* 3c590 */
|
||||
|
@ -2,7 +2,7 @@
|
||||
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
*
|
||||
* generated from:
|
||||
* NetBSD: pcidevs,v 1.1 1995/06/18 01:07:06 cgd Exp
|
||||
* NetBSD: pcidevs,v 1.2 1995/06/20 04:50:43 cgd Exp
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -37,12 +37,30 @@
|
||||
*/
|
||||
|
||||
struct pci_knowndev pci_knowndevs[] = {
|
||||
{
|
||||
PCI_VENDOR_ADP, PCI_PRODUCT_ADP_AIC7850,
|
||||
PCI_KNOWNDEV_UNSUPP,
|
||||
"Adaptec",
|
||||
"AIC-7850",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_ADP, PCI_PRODUCT_ADP_AIC7870,
|
||||
PCI_KNOWNDEV_UNSUPP,
|
||||
"Adaptec",
|
||||
"AIC-7870",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_ADP, PCI_PRODUCT_ADP_AIC2940,
|
||||
PCI_KNOWNDEV_UNSUPP,
|
||||
"Adaptec",
|
||||
"AIC-2940",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_ADP, PCI_PRODUCT_ADP_AIC2940U,
|
||||
PCI_KNOWNDEV_UNSUPP,
|
||||
"Adaptec",
|
||||
"AIC-2940 (\"Ultra\")",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_ATI, PCI_PRODUCT_ATI_MACH32,
|
||||
PCI_KNOWNDEV_UNSUPP,
|
||||
@ -193,6 +211,12 @@ struct pci_knowndev pci_knowndevs[] = {
|
||||
"S3",
|
||||
"Vision 864",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_3COM, PCI_PRODUCT_3COM_3C590,
|
||||
0,
|
||||
"3Com",
|
||||
"3c590",
|
||||
},
|
||||
{
|
||||
PCI_VENDOR_OLDNCR, 0,
|
||||
PCI_KNOWNDEV_UNSUPP | PCI_KNOWNDEV_NOPROD,
|
||||
|
Loading…
Reference in New Issue
Block a user