1995-01-13 02:23:27 +00:00
|
|
|
/*
|
|
|
|
* Product specific probe and attach routines for:
|
1996-04-20 21:31:27 +00:00
|
|
|
* 3940, 2940, aic7880, aic7870, aic7860 and aic7850 SCSI controllers
|
1995-01-13 02:23:27 +00:00
|
|
|
*
|
1996-04-20 21:31:27 +00:00
|
|
|
* Copyright (c) 1995, 1996 Justin T. Gibbs.
|
1995-01-13 02:23:27 +00:00
|
|
|
* 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 immediately at the beginning of the file, without modification,
|
|
|
|
* 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.
|
1996-04-20 21:31:27 +00:00
|
|
|
* 3. The name of the author may not be used to endorse or promote products
|
|
|
|
* derived from this software without specific prior written permission.
|
1995-01-16 16:31:57 +00:00
|
|
|
*
|
1996-04-20 21:31:27 +00:00
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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.
|
|
|
|
*
|
1996-06-08 06:55:55 +00:00
|
|
|
* $Id: aic7870.c,v 1.36 1996/05/30 07:20:17 gibbs Exp $
|
1995-01-13 02:23:27 +00:00
|
|
|
*/
|
|
|
|
|
1996-05-30 07:20:17 +00:00
|
|
|
#if defined(__FreeBSD__)
|
1995-01-13 02:23:27 +00:00
|
|
|
#include <pci.h>
|
1996-05-30 07:20:17 +00:00
|
|
|
#endif
|
|
|
|
#if NPCI > 0 || defined(__NetBSD__)
|
1995-01-13 02:23:27 +00:00
|
|
|
#include <sys/param.h>
|
|
|
|
#include <sys/systm.h>
|
1995-03-31 14:08:33 +00:00
|
|
|
#include <sys/malloc.h>
|
1995-04-15 21:38:34 +00:00
|
|
|
#include <sys/kernel.h>
|
1996-03-31 03:17:50 +00:00
|
|
|
#include <sys/queue.h>
|
1996-05-30 07:20:17 +00:00
|
|
|
#if defined(__NetBSD__)
|
|
|
|
#include <sys/device.h>
|
|
|
|
#include <machine/bus.h>
|
|
|
|
#include <machine/intr.h>
|
|
|
|
#endif /* defined(__NetBSD__) */
|
1996-01-03 06:34:10 +00:00
|
|
|
|
1995-01-13 02:23:27 +00:00
|
|
|
#include <scsi/scsi_all.h>
|
|
|
|
#include <scsi/scsiconf.h>
|
1996-01-03 06:34:10 +00:00
|
|
|
|
1996-05-30 07:20:17 +00:00
|
|
|
#if defined(__FreeBSD__)
|
|
|
|
|
1995-02-02 12:36:19 +00:00
|
|
|
#include <pci/pcireg.h>
|
1995-02-02 13:12:18 +00:00
|
|
|
#include <pci/pcivar.h>
|
1996-01-03 06:34:10 +00:00
|
|
|
|
|
|
|
#include <machine/clock.h>
|
|
|
|
|
1995-01-13 02:23:27 +00:00
|
|
|
#include <i386/scsi/aic7xxx.h>
|
1996-01-03 06:34:10 +00:00
|
|
|
#include <i386/scsi/93cx6.h>
|
|
|
|
|
|
|
|
#include <dev/aic7xxx/aic7xxx_reg.h>
|
1995-01-13 02:23:27 +00:00
|
|
|
|
|
|
|
#define PCI_BASEADR0 PCI_MAP_REG_START
|
1996-05-30 07:20:17 +00:00
|
|
|
|
|
|
|
#elif defined(__NetBSD__)
|
|
|
|
|
|
|
|
#include <dev/pci/pcireg.h>
|
|
|
|
#include <dev/pci/pcivar.h>
|
|
|
|
|
|
|
|
#include <dev/ic/aic7xxxreg.h>
|
|
|
|
#include <dev/ic/aic7xxxvar.h>
|
|
|
|
#include <dev/ic/smc93cx6var.h>
|
|
|
|
|
|
|
|
#define bootverbose 1
|
|
|
|
#define PCI_BASEADR0 PCI_MAPREG_START
|
|
|
|
|
|
|
|
#endif /* defined(__NetBSD__) */
|
|
|
|
|
1995-10-26 23:58:59 +00:00
|
|
|
#define PCI_DEVICE_ID_ADAPTEC_3940U 0x82789004ul
|
1996-01-03 06:34:10 +00:00
|
|
|
#define PCI_DEVICE_ID_ADAPTEC_2944U 0x84789004ul
|
1995-10-08 17:46:11 +00:00
|
|
|
#define PCI_DEVICE_ID_ADAPTEC_2940U 0x81789004ul
|
1995-07-04 21:21:33 +00:00
|
|
|
#define PCI_DEVICE_ID_ADAPTEC_3940 0x72789004ul
|
1996-01-03 06:34:10 +00:00
|
|
|
#define PCI_DEVICE_ID_ADAPTEC_2944 0x74789004ul
|
1995-01-13 02:23:27 +00:00
|
|
|
#define PCI_DEVICE_ID_ADAPTEC_2940 0x71789004ul
|
1995-10-26 23:58:59 +00:00
|
|
|
#define PCI_DEVICE_ID_ADAPTEC_AIC7880 0x80789004ul
|
1995-01-22 00:47:50 +00:00
|
|
|
#define PCI_DEVICE_ID_ADAPTEC_AIC7870 0x70789004ul
|
1996-04-20 21:31:27 +00:00
|
|
|
#define PCI_DEVICE_ID_ADAPTEC_AIC7860 0x60789004ul
|
|
|
|
#define PCI_DEVICE_ID_ADAPTEC_AIC7855 0x55789004ul
|
1995-08-20 03:18:09 +00:00
|
|
|
#define PCI_DEVICE_ID_ADAPTEC_AIC7850 0x50789004ul
|
1995-01-13 02:23:27 +00:00
|
|
|
|
1995-09-05 23:53:48 +00:00
|
|
|
#define DEVCONFIG 0x40
|
|
|
|
#define MPORTMODE 0x00000400ul /* aic7870 only */
|
|
|
|
#define RAMPSM 0x00000200ul /* aic7870 only */
|
|
|
|
#define VOLSENSE 0x00000100ul
|
1996-01-03 06:34:10 +00:00
|
|
|
#define SCBRAMSEL 0x00000080ul
|
1995-09-05 23:53:48 +00:00
|
|
|
#define MRDCEN 0x00000040ul
|
|
|
|
#define EXTSCBTIME 0x00000020ul /* aic7870 only */
|
|
|
|
#define EXTSCBPEN 0x00000010ul /* aic7870 only */
|
|
|
|
#define BERREN 0x00000008ul
|
|
|
|
#define DACEN 0x00000004ul
|
|
|
|
#define STPWLEVEL 0x00000002ul
|
|
|
|
#define DIFACTNEGEN 0x00000001ul /* aic7870 only */
|
|
|
|
|
1996-01-03 06:34:10 +00:00
|
|
|
#define CSIZE_LATTIME 0x0c
|
|
|
|
#define CACHESIZE 0x0000003ful /* only 5 bits */
|
|
|
|
#define LATTIME 0x0000ff00ul
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Define the format of the aic78X0 SEEPROM registers (16 bits).
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct seeprom_config {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* SCSI ID Configuration Flags
|
|
|
|
*/
|
|
|
|
#define CFXFER 0x0007 /* synchronous transfer rate */
|
|
|
|
#define CFSYNCH 0x0008 /* enable synchronous transfer */
|
|
|
|
#define CFDISC 0x0010 /* enable disconnection */
|
|
|
|
#define CFWIDEB 0x0020 /* wide bus device */
|
|
|
|
/* UNUSED 0x00C0 */
|
|
|
|
#define CFSTART 0x0100 /* send start unit SCSI command */
|
|
|
|
#define CFINCBIOS 0x0200 /* include in BIOS scan */
|
|
|
|
#define CFRNFOUND 0x0400 /* report even if not found */
|
|
|
|
/* UNUSED 0xf800 */
|
1996-05-30 07:20:17 +00:00
|
|
|
u_int16_t device_flags[16]; /* words 0-15 */
|
1996-01-03 06:34:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* BIOS Control Bits
|
|
|
|
*/
|
|
|
|
#define CFSUPREM 0x0001 /* support all removeable drives */
|
|
|
|
#define CFSUPREMB 0x0002 /* support removeable drives for boot only */
|
|
|
|
#define CFBIOSEN 0x0004 /* BIOS enabled */
|
|
|
|
/* UNUSED 0x0008 */
|
|
|
|
#define CFSM2DRV 0x0010 /* support more than two drives */
|
|
|
|
/* UNUSED 0x0060 */
|
|
|
|
#define CFEXTEND 0x0080 /* extended translation enabled */
|
|
|
|
/* UNUSED 0xff00 */
|
1996-05-30 07:20:17 +00:00
|
|
|
u_int16_t bios_control; /* word 16 */
|
1996-01-03 06:34:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Host Adapter Control Bits
|
|
|
|
*/
|
|
|
|
/* UNUSED 0x0001 */
|
|
|
|
#define CFULTRAEN 0x0002 /* Ultra SCSI speed enable (Ultra cards) */
|
|
|
|
#define CFSTERM 0x0004 /* SCSI low byte termination (non-wide cards) */
|
|
|
|
#define CFWSTERM 0x0008 /* SCSI high byte termination (wide card) */
|
|
|
|
#define CFSPARITY 0x0010 /* SCSI parity */
|
|
|
|
/* UNUSED 0x0020 */
|
|
|
|
#define CFRESETB 0x0040 /* reset SCSI bus at IC initialization */
|
|
|
|
/* UNUSED 0xff80 */
|
1996-05-30 07:20:17 +00:00
|
|
|
u_int16_t adapter_control; /* word 17 */
|
1996-01-03 06:34:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Bus Release, Host Adapter ID
|
|
|
|
*/
|
|
|
|
#define CFSCSIID 0x000f /* host adapter SCSI ID */
|
|
|
|
/* UNUSED 0x00f0 */
|
|
|
|
#define CFBRTIME 0xff00 /* bus release time */
|
1996-05-30 07:20:17 +00:00
|
|
|
u_int16_t brtime_id; /* word 18 */
|
1996-01-03 06:34:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Maximum targets
|
|
|
|
*/
|
|
|
|
#define CFMAXTARG 0x00ff /* maximum targets */
|
|
|
|
/* UNUSED 0xff00 */
|
1996-05-30 07:20:17 +00:00
|
|
|
u_int16_t max_targets; /* word 19 */
|
1996-01-03 06:34:10 +00:00
|
|
|
|
1996-05-30 07:20:17 +00:00
|
|
|
u_int16_t res_1[11]; /* words 20-30 */
|
|
|
|
u_int16_t checksum; /* word 31 */
|
1996-01-03 06:34:10 +00:00
|
|
|
};
|
|
|
|
|
1996-05-10 16:26:41 +00:00
|
|
|
static void load_seeprom __P((struct ahc_data *ahc));
|
1996-05-30 07:20:17 +00:00
|
|
|
static int acquire_seeprom __P((struct seeprom_descriptor *sd));
|
|
|
|
static void release_seeprom __P((struct seeprom_descriptor *sd));
|
1995-01-13 02:23:27 +00:00
|
|
|
|
1995-09-05 23:53:48 +00:00
|
|
|
static u_char aic3940_count;
|
1995-01-13 02:23:27 +00:00
|
|
|
|
1996-05-30 07:20:17 +00:00
|
|
|
#if defined(__FreeBSD__)
|
|
|
|
|
|
|
|
static char* aic7870_probe __P((pcici_t tag, pcidi_t type));
|
|
|
|
static void aic7870_attach __P((pcici_t config_id, int unit));
|
|
|
|
|
1995-12-14 09:55:16 +00:00
|
|
|
static struct pci_device ahc_pci_driver = {
|
1995-02-02 13:12:18 +00:00
|
|
|
"ahc",
|
1995-01-13 02:23:27 +00:00
|
|
|
aic7870_probe,
|
|
|
|
aic7870_attach,
|
1995-11-05 04:51:58 +00:00
|
|
|
&ahc_unit,
|
1995-03-17 04:27:21 +00:00
|
|
|
NULL
|
1995-01-13 02:23:27 +00:00
|
|
|
};
|
|
|
|
|
1995-11-05 04:51:58 +00:00
|
|
|
DATA_SET (pcidevice_set, ahc_pci_driver);
|
1995-02-02 13:12:18 +00:00
|
|
|
|
1995-05-30 08:16:23 +00:00
|
|
|
static char*
|
1995-01-13 02:23:27 +00:00
|
|
|
aic7870_probe (pcici_t tag, pcidi_t type)
|
1995-05-30 08:16:23 +00:00
|
|
|
{
|
1995-01-13 02:23:27 +00:00
|
|
|
switch(type) {
|
1995-10-26 23:58:59 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_3940U:
|
|
|
|
return ("Adaptec 3940 Ultra SCSI host adapter");
|
|
|
|
break;
|
1995-07-04 21:21:33 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_3940:
|
|
|
|
return ("Adaptec 3940 SCSI host adapter");
|
|
|
|
break;
|
1996-01-03 06:34:10 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_2944U:
|
|
|
|
return ("Adaptec 2944 Ultra SCSI host adapter");
|
|
|
|
break;
|
1995-10-08 17:46:11 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_2940U:
|
|
|
|
return ("Adaptec 2940 Ultra SCSI host adapter");
|
|
|
|
break;
|
1996-01-03 06:34:10 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_2944:
|
|
|
|
return ("Adaptec 2944 SCSI host adapter");
|
|
|
|
break;
|
1995-01-13 02:23:27 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_2940:
|
1995-07-04 21:21:33 +00:00
|
|
|
return ("Adaptec 2940 SCSI host adapter");
|
1995-03-31 14:08:33 +00:00
|
|
|
break;
|
1995-10-26 23:58:59 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7880:
|
|
|
|
return ("Adaptec aic7880 Ultra SCSI host adapter");
|
|
|
|
break;
|
1995-01-22 00:47:50 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7870:
|
1995-03-31 14:08:33 +00:00
|
|
|
return ("Adaptec aic7870 SCSI host adapter");
|
|
|
|
break;
|
1996-04-20 21:31:27 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7860:
|
|
|
|
return ("Adaptec aic7860 SCSI host adapter");
|
|
|
|
break;
|
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7855:
|
|
|
|
return ("Adaptec aic7855 SCSI host adapter");
|
|
|
|
break;
|
1995-06-11 19:33:05 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7850:
|
|
|
|
return ("Adaptec aic7850 SCSI host adapter");
|
|
|
|
break;
|
1995-01-13 02:23:27 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return (0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
1996-05-30 07:20:17 +00:00
|
|
|
#elif defined(__NetBSD__)
|
|
|
|
|
|
|
|
int ahc_pci_probe __P((struct device *, void *, void *));
|
|
|
|
void ahc_pci_attach __P((struct device *, struct device *, void *));
|
|
|
|
|
|
|
|
struct cfattach ahc_pci_ca = {
|
|
|
|
sizeof(struct ahc_data), ahc_pci_probe, ahc_pci_attach
|
|
|
|
};
|
|
|
|
|
|
|
|
int
|
|
|
|
ahc_pci_probe(parent, match, aux)
|
|
|
|
struct device *parent;
|
|
|
|
void *match, *aux;
|
|
|
|
{
|
|
|
|
struct pci_attach_args *pa = aux;
|
|
|
|
|
|
|
|
switch (pa->pa_id) {
|
|
|
|
case PCI_DEVICE_ID_ADAPTEC_3940U:
|
|
|
|
case PCI_DEVICE_ID_ADAPTEC_2944U:
|
|
|
|
case PCI_DEVICE_ID_ADAPTEC_2940U:
|
|
|
|
case PCI_DEVICE_ID_ADAPTEC_3940:
|
|
|
|
case PCI_DEVICE_ID_ADAPTEC_2944:
|
|
|
|
case PCI_DEVICE_ID_ADAPTEC_2940:
|
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7880:
|
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7870:
|
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7860:
|
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7855:
|
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7850:
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif /* defined(__NetBSD__) */
|
|
|
|
|
|
|
|
#if defined(__FreeBSD__)
|
1995-12-14 09:55:16 +00:00
|
|
|
static void
|
1995-01-13 02:23:27 +00:00
|
|
|
aic7870_attach(config_id, unit)
|
|
|
|
pcici_t config_id;
|
|
|
|
int unit;
|
1996-05-30 07:20:17 +00:00
|
|
|
#elif defined(__NetBSD__)
|
|
|
|
void
|
|
|
|
ahc_pci_attach(parent, self, aux)
|
|
|
|
struct device *parent, *self;
|
|
|
|
void *aux;
|
|
|
|
#endif
|
1995-05-30 08:16:23 +00:00
|
|
|
{
|
1996-05-30 07:20:17 +00:00
|
|
|
#if defined(__FreeBSD__)
|
1995-05-30 08:16:23 +00:00
|
|
|
u_long io_port;
|
1996-05-30 07:20:17 +00:00
|
|
|
#elif defined(__NetBSD__)
|
|
|
|
struct pci_attach_args *pa = aux;
|
|
|
|
struct ahc_data *ahc = (void *)self;
|
|
|
|
int unit = ahc->sc_dev.dv_unit;
|
|
|
|
bus_io_addr_t iobase;
|
|
|
|
bus_io_size_t iosize;
|
|
|
|
bus_io_handle_t ioh;
|
|
|
|
pci_intr_handle_t ih;
|
|
|
|
const char *intrstr;
|
|
|
|
#endif
|
1995-10-26 23:58:59 +00:00
|
|
|
u_long id;
|
1995-03-31 14:08:33 +00:00
|
|
|
unsigned opri = 0;
|
|
|
|
ahc_type ahc_t = AHC_NONE;
|
1995-09-05 23:53:48 +00:00
|
|
|
ahc_flag ahc_f = AHC_FNONE;
|
1996-05-30 07:20:17 +00:00
|
|
|
#if defined(__FreeBSD__)
|
1995-11-05 04:51:58 +00:00
|
|
|
struct ahc_data *ahc;
|
1996-05-30 07:20:17 +00:00
|
|
|
#endif
|
1996-05-10 16:26:41 +00:00
|
|
|
u_char ultra_enb = 0;
|
|
|
|
u_char our_id = 0;
|
1995-11-05 04:51:58 +00:00
|
|
|
|
1996-05-30 07:20:17 +00:00
|
|
|
#if defined(__FreeBSD__)
|
1995-03-31 14:08:33 +00:00
|
|
|
if(!(io_port = pci_conf_read(config_id, PCI_BASEADR0)))
|
1995-01-13 02:23:27 +00:00
|
|
|
return;
|
1995-03-31 14:08:33 +00:00
|
|
|
/*
|
|
|
|
* The first bit of PCI_BASEADR0 is always
|
1995-11-05 04:51:58 +00:00
|
|
|
* set hence we mask it off.
|
1995-03-31 14:08:33 +00:00
|
|
|
*/
|
1995-11-05 04:51:58 +00:00
|
|
|
io_port &= 0xfffffffe;
|
1996-05-30 07:20:17 +00:00
|
|
|
#elif defined(__NetBSD__)
|
|
|
|
if (pci_io_find(pa->pa_pc, pa->pa_tag, PCI_BASEADR0, &iobase, &iosize))
|
|
|
|
return;
|
|
|
|
if (bus_io_map(pa->pa_bc, iobase, iosize, &ioh))
|
|
|
|
return;
|
|
|
|
#endif
|
1995-03-31 14:08:33 +00:00
|
|
|
|
1996-05-30 07:20:17 +00:00
|
|
|
#if defined(__FreeBSD__)
|
1995-10-26 23:58:59 +00:00
|
|
|
switch ((id = pci_conf_read(config_id, PCI_ID_REG))) {
|
1996-05-30 07:20:17 +00:00
|
|
|
#elif defined(__NetBSD__)
|
|
|
|
switch (id = pa->pa_id) {
|
|
|
|
#endif
|
1995-10-26 23:58:59 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_3940U:
|
1995-07-04 21:21:33 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_3940:
|
1995-10-26 23:58:59 +00:00
|
|
|
if (id == PCI_DEVICE_ID_ADAPTEC_3940U)
|
|
|
|
ahc_t = AHC_394U;
|
|
|
|
else
|
|
|
|
ahc_t = AHC_394;
|
1995-09-05 23:53:48 +00:00
|
|
|
aic3940_count++;
|
|
|
|
if(!(aic3940_count & 0x01))
|
|
|
|
/* Even count implies second channel */
|
|
|
|
ahc_f |= AHC_CHNLB;
|
1995-07-04 21:21:33 +00:00
|
|
|
break;
|
1996-01-03 06:34:10 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_2944U:
|
1995-10-08 17:46:11 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_2940U:
|
1995-10-26 23:58:59 +00:00
|
|
|
ahc_t = AHC_294U;
|
|
|
|
break;
|
1996-01-03 06:34:10 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_2944:
|
1995-03-31 14:08:33 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_2940:
|
1995-05-30 08:16:23 +00:00
|
|
|
ahc_t = AHC_294;
|
1995-03-31 14:08:33 +00:00
|
|
|
break;
|
1995-10-26 23:58:59 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7880:
|
|
|
|
ahc_t = AHC_AIC7880;
|
|
|
|
break;
|
1995-03-31 14:08:33 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7870:
|
|
|
|
ahc_t = AHC_AIC7870;
|
|
|
|
break;
|
1996-04-20 21:31:27 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7860:
|
|
|
|
ahc_t = AHC_AIC7860;
|
|
|
|
break;
|
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7855:
|
1995-06-11 19:33:05 +00:00
|
|
|
case PCI_DEVICE_ID_ADAPTEC_AIC7850:
|
|
|
|
ahc_t = AHC_AIC7850;
|
|
|
|
break;
|
1995-03-31 14:08:33 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
1996-04-20 21:31:27 +00:00
|
|
|
/* On all PCI adapters, we allow SCB paging */
|
|
|
|
ahc_f |= AHC_PAGESCBS;
|
|
|
|
|
1996-05-10 16:26:41 +00:00
|
|
|
/* Remeber how the card was setup in case there is no SEEPROM */
|
1996-05-30 07:20:17 +00:00
|
|
|
#if defined(__FreeBSD__)
|
1996-05-10 16:26:41 +00:00
|
|
|
our_id = inb(SCSIID + io_port) & OID;
|
|
|
|
if(ahc_t & AHC_ULTRA)
|
|
|
|
ultra_enb = inb(SXFRCTL0 + io_port) & ULTRAEN;
|
1996-05-30 07:20:17 +00:00
|
|
|
#else
|
|
|
|
our_id = bus_io_read_1(pa->pa_bc, ioh, SCSIID) & OID;
|
|
|
|
if(ahc_t & AHC_ULTRA)
|
|
|
|
ultra_enb = bus_io_read_1(pa->pa_bc, ioh, SXFRCTL0) & ULTRAEN;
|
|
|
|
#endif
|
1996-05-10 16:26:41 +00:00
|
|
|
|
1996-05-30 07:20:17 +00:00
|
|
|
#if defined(__FreeBSD__)
|
1996-01-03 06:34:10 +00:00
|
|
|
ahc_reset(io_port);
|
1996-05-30 07:20:17 +00:00
|
|
|
#elif defined(__NetBSD__)
|
|
|
|
printf("\n");
|
|
|
|
ahc_reset(ahc->sc_dev.dv_xname, pa->pa_bc, ioh);
|
|
|
|
#endif
|
1996-01-03 06:34:10 +00:00
|
|
|
|
1995-09-05 23:53:48 +00:00
|
|
|
if(ahc_t & AHC_AIC7870){
|
1996-05-30 07:20:17 +00:00
|
|
|
#if defined(__FreeBSD__)
|
1995-09-05 23:53:48 +00:00
|
|
|
u_long devconfig = pci_conf_read(config_id, DEVCONFIG);
|
1996-05-30 07:20:17 +00:00
|
|
|
#elif defined(__NetBSD__)
|
|
|
|
u_long devconfig =
|
|
|
|
pci_conf_read(pa->pa_pc, pa->pa_tag, DEVCONFIG);
|
|
|
|
#endif
|
|
|
|
|
1996-01-03 06:34:10 +00:00
|
|
|
if(devconfig & (RAMPSM)) {
|
1995-09-05 23:53:48 +00:00
|
|
|
/*
|
|
|
|
* External SRAM present. Have the probe walk
|
|
|
|
* the SCBs to see how much SRAM we have and set
|
1996-01-03 06:34:10 +00:00
|
|
|
* the number of SCBs accordingly. We have to
|
|
|
|
* turn off SCBRAMSEL to access the external
|
|
|
|
* SCB SRAM.
|
|
|
|
*
|
|
|
|
* It seems that early versions of the aic7870
|
|
|
|
* didn't use these bits, hence the hack for the
|
|
|
|
* 3940 above. I would guess that recent 3940s
|
|
|
|
* using later aic7870 or aic7880 chips do
|
|
|
|
* actually set RAMPSM.
|
|
|
|
*
|
|
|
|
* The documentation isn't clear, but it sounds
|
|
|
|
* like the value written to devconfig must not
|
|
|
|
* have RAMPSM set. The second sixteen bits of
|
|
|
|
* the register are R/O anyway, so it shouldn't
|
|
|
|
* affect RAMPSM either way.
|
1995-09-05 23:53:48 +00:00
|
|
|
*/
|
1996-01-03 06:34:10 +00:00
|
|
|
devconfig &= ~(RAMPSM|SCBRAMSEL);
|
1996-05-30 07:20:17 +00:00
|
|
|
#if defined(__FreeBSD__)
|
1996-01-03 06:34:10 +00:00
|
|
|
pci_conf_write(config_id, DEVCONFIG, devconfig);
|
1996-05-30 07:20:17 +00:00
|
|
|
#elif defined(__NetBSD__)
|
|
|
|
pci_conf_write(pa->pa_pc, pa->pa_tag,
|
|
|
|
DEVCONFIG, devconfig);
|
|
|
|
#endif
|
1995-09-05 23:53:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1996-05-30 07:20:17 +00:00
|
|
|
#if defined(__FreeBSD__)
|
1995-11-05 04:51:58 +00:00
|
|
|
if(!(ahc = ahc_alloc(unit, io_port, ahc_t, ahc_f)))
|
|
|
|
return; /* XXX PCI code should take return status */
|
|
|
|
|
1996-01-23 21:48:28 +00:00
|
|
|
if(!(pci_map_int(config_id, ahc_intr, (void *)ahc, &bio_imask))) {
|
1995-11-05 04:51:58 +00:00
|
|
|
ahc_free(ahc);
|
|
|
|
return;
|
|
|
|
}
|
1996-05-30 07:20:17 +00:00
|
|
|
#elif defined(__NetBSD__)
|
|
|
|
ahc_construct(ahc, pa->pa_bc, ioh, ahc_t, ahc_f);
|
|
|
|
|
|
|
|
if (pci_intr_map(pa->pa_pc, pa->pa_intrtag, pa->pa_intrpin,
|
|
|
|
pa->pa_intrline, &ih)) {
|
|
|
|
printf("%s: couldn't map interrupt\n", ahc->sc_dev.dv_xname);
|
|
|
|
ahc_free(ahc);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
intrstr = pci_intr_string(pa->pa_pc, ih);
|
|
|
|
ahc->sc_ih = pci_intr_establish(pa->pa_pc, ih, IPL_BIO, ahc_intr, ahc
|
|
|
|
#ifdef __OpenBSD__
|
|
|
|
, ahc->sc_dev.dv_xname
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
if (ahc->sc_ih == NULL) {
|
|
|
|
printf("%s: couldn't establish interrupt",
|
|
|
|
ahc->sc_dev.dv_xname);
|
|
|
|
if (intrstr != NULL)
|
|
|
|
printf(" at %s", intrstr);
|
|
|
|
printf("\n");
|
|
|
|
ahc_free(ahc);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (intrstr != NULL)
|
|
|
|
printf("%s: interrupting at %s\n", ahc->sc_dev.dv_xname,
|
|
|
|
intrstr);
|
|
|
|
#endif
|
1995-11-05 04:51:58 +00:00
|
|
|
/*
|
|
|
|
* Protect ourself from spurrious interrupts during
|
|
|
|
* intialization.
|
|
|
|
*/
|
|
|
|
opri = splbio();
|
|
|
|
|
1996-01-03 06:34:10 +00:00
|
|
|
/*
|
|
|
|
* Do aic7870/aic7880/aic7850 specific initialization
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
u_char sblkctl;
|
|
|
|
char *id_string;
|
|
|
|
|
|
|
|
switch(ahc->type) {
|
|
|
|
case AHC_394U:
|
|
|
|
case AHC_294U:
|
|
|
|
case AHC_AIC7880:
|
|
|
|
{
|
|
|
|
id_string = "aic7880 ";
|
|
|
|
load_seeprom(ahc);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case AHC_394:
|
|
|
|
case AHC_294:
|
|
|
|
case AHC_AIC7870:
|
|
|
|
{
|
|
|
|
id_string = "aic7870 ";
|
|
|
|
load_seeprom(ahc);
|
|
|
|
break;
|
|
|
|
}
|
1996-04-20 21:31:27 +00:00
|
|
|
case AHC_AIC7860:
|
|
|
|
{
|
|
|
|
id_string = "aic7860 ";
|
1996-05-10 16:26:41 +00:00
|
|
|
/*
|
|
|
|
* Use defaults, if the chip wasn't initialized by
|
|
|
|
* a BIOS.
|
|
|
|
*/
|
1996-04-20 21:31:27 +00:00
|
|
|
ahc->flags |= AHC_USEDEFAULTS;
|
|
|
|
break;
|
|
|
|
}
|
1996-01-03 06:34:10 +00:00
|
|
|
case AHC_AIC7850:
|
|
|
|
{
|
|
|
|
id_string = "aic7850 ";
|
1996-05-10 16:26:41 +00:00
|
|
|
/*
|
|
|
|
* Use defaults, if the chip wasn't initialized by
|
|
|
|
* a BIOS.
|
|
|
|
*/
|
1996-01-03 06:34:10 +00:00
|
|
|
ahc->flags |= AHC_USEDEFAULTS;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
printf("ahc: Unknown controller type. Ignoring.\n");
|
1996-05-12 01:50:33 +00:00
|
|
|
ahc_free(ahc);
|
1996-05-12 01:46:11 +00:00
|
|
|
splx(opri);
|
1996-01-03 06:34:10 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Take the LED out of diagnostic mode
|
|
|
|
*/
|
1996-05-30 07:20:17 +00:00
|
|
|
sblkctl = AHC_INB(ahc, SBLKCTL);
|
|
|
|
AHC_OUTB(ahc, SBLKCTL, (sblkctl & ~(DIAGLEDEN|DIAGLEDON)));
|
1996-01-03 06:34:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* I don't know where this is set in the SEEPROM or by the
|
|
|
|
* BIOS, so we default to 100%.
|
|
|
|
*/
|
1996-05-30 07:20:17 +00:00
|
|
|
AHC_OUTB(ahc, DSPCISTATUS, DFTHRSH_100);
|
1996-01-03 06:34:10 +00:00
|
|
|
|
|
|
|
if(ahc->flags & AHC_USEDEFAULTS) {
|
|
|
|
/*
|
|
|
|
* PCI Adapter default setup
|
|
|
|
* Should only be used if the adapter does not have
|
1996-05-10 16:26:41 +00:00
|
|
|
* an SEEPROM.
|
1996-01-03 06:34:10 +00:00
|
|
|
*/
|
1996-05-10 16:26:41 +00:00
|
|
|
/* See if someone else set us up already */
|
|
|
|
u_long i;
|
1996-05-30 07:20:17 +00:00
|
|
|
for(i = TARG_SCRATCH; i < 0x60; i++) {
|
|
|
|
if(AHC_INB(ahc, i) != 0x00)
|
1996-05-10 16:26:41 +00:00
|
|
|
break;
|
|
|
|
}
|
1996-05-30 07:20:17 +00:00
|
|
|
if(i == TARG_SCRATCH) {
|
1996-05-21 18:38:41 +00:00
|
|
|
/*
|
|
|
|
* Try looking for all ones. You can get
|
|
|
|
* either.
|
|
|
|
*/
|
1996-05-30 07:20:17 +00:00
|
|
|
for (i = TARG_SCRATCH; i < 0x60; i++) {
|
|
|
|
if(AHC_INB(ahc, i) != 0xff)
|
1996-05-21 18:38:41 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
1996-06-08 06:55:55 +00:00
|
|
|
if((i != 0x60) && (our_id != 0)) {
|
1996-05-30 07:20:17 +00:00
|
|
|
printf("%s: Using left over BIOS settings\n",
|
|
|
|
ahc_name(ahc));
|
1996-05-10 16:26:41 +00:00
|
|
|
ahc->flags &= ~AHC_USEDEFAULTS;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
our_id = 0x07;
|
1996-05-30 07:20:17 +00:00
|
|
|
AHC_OUTB(ahc, SCSICONF,
|
|
|
|
(our_id & 0x07)|ENSPCHK|RESET_SCSI);
|
1996-01-03 06:34:10 +00:00
|
|
|
/* In case we are a wide card */
|
1996-05-30 07:20:17 +00:00
|
|
|
AHC_OUTB(ahc, SCSICONF + 1, our_id);
|
1996-05-10 16:26:41 +00:00
|
|
|
|
|
|
|
if(!ultra_enb || (ahc->flags & AHC_USEDEFAULTS)) {
|
|
|
|
/*
|
|
|
|
* If there wasn't a BIOS or the board
|
|
|
|
* wasn't in this mode to begin with,
|
|
|
|
* turn off ultra.
|
|
|
|
*/
|
|
|
|
ahc->type &= ~AHC_ULTRA;
|
|
|
|
}
|
1996-01-03 06:34:10 +00:00
|
|
|
}
|
1996-05-10 16:26:41 +00:00
|
|
|
|
1996-05-30 07:20:17 +00:00
|
|
|
printf("%s: %s", ahc_name(ahc), id_string);
|
1996-01-03 06:34:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if(ahc_init(ahc)){
|
1995-11-05 04:51:58 +00:00
|
|
|
ahc_free(ahc);
|
1995-03-31 14:08:33 +00:00
|
|
|
splx(opri);
|
1995-11-05 04:51:58 +00:00
|
|
|
return; /* XXX PCI code should take return status */
|
1995-01-13 02:23:27 +00:00
|
|
|
}
|
1995-11-05 04:51:58 +00:00
|
|
|
splx(opri);
|
1996-01-03 06:34:10 +00:00
|
|
|
|
|
|
|
ahc_attach(ahc);
|
1995-05-30 08:16:23 +00:00
|
|
|
}
|
1995-01-13 02:23:27 +00:00
|
|
|
|
1996-01-03 06:34:10 +00:00
|
|
|
/*
|
|
|
|
* Read the SEEPROM. Return 0 on failure
|
|
|
|
*/
|
1996-05-10 16:26:41 +00:00
|
|
|
void
|
1996-01-03 06:34:10 +00:00
|
|
|
load_seeprom(ahc)
|
|
|
|
struct ahc_data *ahc;
|
|
|
|
{
|
1996-05-30 07:20:17 +00:00
|
|
|
struct seeprom_descriptor sd;
|
1996-01-03 06:34:10 +00:00
|
|
|
struct seeprom_config sc;
|
|
|
|
u_short *scarray = (u_short *)≻
|
|
|
|
u_short checksum = 0;
|
1996-03-10 07:12:49 +00:00
|
|
|
u_char scsi_conf;
|
1996-03-11 02:49:48 +00:00
|
|
|
u_char host_id;
|
1996-05-10 16:26:41 +00:00
|
|
|
int have_seeprom;
|
1996-01-03 06:34:10 +00:00
|
|
|
|
1996-05-30 07:20:17 +00:00
|
|
|
#if defined(__FreeBSD__)
|
|
|
|
sd.sd_iobase = ahc->baseport + SEECTL;
|
|
|
|
#elif defined(__NetBSD__)
|
|
|
|
sd.sd_bc = ahc->sc_bc;
|
|
|
|
sd.sd_ioh = ahc->sc_ioh;
|
|
|
|
sd.sd_offset = SEECTL;
|
|
|
|
#endif
|
|
|
|
sd.sd_MS = SEEMS;
|
|
|
|
sd.sd_RDY = SEERDY;
|
|
|
|
sd.sd_CS = SEECS;
|
|
|
|
sd.sd_CK = SEECK;
|
|
|
|
sd.sd_DO = SEEDO;
|
|
|
|
sd.sd_DI = SEEDI;
|
|
|
|
|
1996-01-03 06:34:10 +00:00
|
|
|
if(bootverbose)
|
1996-05-30 07:20:17 +00:00
|
|
|
printf("%s: Reading SEEPROM...", ahc_name(ahc));
|
|
|
|
have_seeprom = acquire_seeprom(&sd);
|
1996-01-03 06:34:10 +00:00
|
|
|
if (have_seeprom) {
|
1996-05-30 07:20:17 +00:00
|
|
|
have_seeprom = read_seeprom(&sd,
|
|
|
|
(u_int16_t *)&sc,
|
1996-01-03 06:34:10 +00:00
|
|
|
ahc->flags & AHC_CHNLB,
|
1996-05-30 07:20:17 +00:00
|
|
|
sizeof(sc)/2);
|
|
|
|
release_seeprom(&sd);
|
1996-01-03 06:34:10 +00:00
|
|
|
if (have_seeprom) {
|
|
|
|
/* Check checksum */
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0;i < (sizeof(sc)/2 - 1);i = i + 1)
|
|
|
|
checksum = checksum + scarray[i];
|
|
|
|
if (checksum != sc.checksum) {
|
1996-05-10 16:26:41 +00:00
|
|
|
if(bootverbose)
|
|
|
|
printf ("checksum error");
|
1996-01-03 06:34:10 +00:00
|
|
|
have_seeprom = 0;
|
|
|
|
}
|
1996-03-10 07:12:49 +00:00
|
|
|
else if(bootverbose)
|
1996-01-03 06:34:10 +00:00
|
|
|
printf("done.\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!have_seeprom) {
|
1996-05-10 16:26:41 +00:00
|
|
|
if(bootverbose)
|
1996-05-30 07:20:17 +00:00
|
|
|
printf("\n%s: No SEEPROM availible\n", ahc_name(ahc));
|
1996-05-10 16:26:41 +00:00
|
|
|
ahc->flags |= AHC_USEDEFAULTS;
|
1996-01-03 06:34:10 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
/*
|
|
|
|
* Put the data we've collected down into SRAM
|
|
|
|
* where ahc_init will find it.
|
|
|
|
*/
|
|
|
|
int i;
|
|
|
|
int max_targ = sc.max_targets & CFMAXTARG;
|
|
|
|
|
1996-05-23 15:02:18 +00:00
|
|
|
for(i = 0; i < max_targ; i++){
|
1996-01-03 06:34:10 +00:00
|
|
|
u_char target_settings;
|
|
|
|
target_settings = (sc.device_flags[i] & CFXFER) << 4;
|
|
|
|
if (sc.device_flags[i] & CFSYNCH)
|
|
|
|
target_settings |= SOFS;
|
|
|
|
if (sc.device_flags[i] & CFWIDEB)
|
|
|
|
target_settings |= WIDEXFER;
|
|
|
|
if (sc.device_flags[i] & CFDISC)
|
|
|
|
ahc->discenable |= (0x01 << i);
|
1996-05-30 07:20:17 +00:00
|
|
|
AHC_OUTB(ahc, TARG_SCRATCH+i, target_settings);
|
1996-01-03 06:34:10 +00:00
|
|
|
}
|
1996-05-30 07:20:17 +00:00
|
|
|
AHC_OUTB(ahc, DISC_DSB, ~(ahc->discenable & 0xff));
|
|
|
|
AHC_OUTB(ahc, DISC_DSB + 1, ~((ahc->discenable >> 8) & 0xff));
|
1996-01-03 06:34:10 +00:00
|
|
|
|
1996-03-11 02:49:48 +00:00
|
|
|
host_id = sc.brtime_id & CFSCSIID;
|
|
|
|
|
|
|
|
scsi_conf = (host_id & 0x7);
|
1996-03-10 07:12:49 +00:00
|
|
|
if(sc.adapter_control & CFSPARITY)
|
|
|
|
scsi_conf |= ENSPCHK;
|
1996-05-10 16:26:41 +00:00
|
|
|
if(sc.adapter_control & CFRESETB)
|
|
|
|
scsi_conf |= RESET_SCSI;
|
1996-01-03 06:34:10 +00:00
|
|
|
|
|
|
|
if(ahc->type & AHC_ULTRA) {
|
|
|
|
/* Should we enable Ultra mode? */
|
|
|
|
if(!(sc.adapter_control & CFULTRAEN))
|
|
|
|
/* Treat us as a non-ultra card */
|
|
|
|
ahc->type &= ~AHC_ULTRA;
|
|
|
|
}
|
1996-05-10 16:26:41 +00:00
|
|
|
/* Set the host ID */
|
1996-05-30 07:20:17 +00:00
|
|
|
AHC_OUTB(ahc, SCSICONF, scsi_conf);
|
1996-05-10 16:26:41 +00:00
|
|
|
/* In case we are a wide card */
|
1996-05-30 07:20:17 +00:00
|
|
|
AHC_OUTB(ahc, SCSICONF + 1, host_id);
|
1996-01-03 06:34:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
1996-05-30 07:20:17 +00:00
|
|
|
acquire_seeprom(sd)
|
|
|
|
struct seeprom_descriptor *sd;
|
1996-01-03 06:34:10 +00:00
|
|
|
{
|
|
|
|
int wait;
|
1996-05-30 07:20:17 +00:00
|
|
|
|
1996-01-03 06:34:10 +00:00
|
|
|
/*
|
|
|
|
* Request access of the memory port. When access is
|
|
|
|
* granted, SEERDY will go high. We use a 1 second
|
|
|
|
* timeout which should be near 1 second more than
|
|
|
|
* is needed. Reason: after the chip reset, there
|
|
|
|
* should be no contention.
|
|
|
|
*/
|
1996-05-30 07:20:17 +00:00
|
|
|
SEEPROM_OUTB(sd, sd->sd_MS);
|
1996-01-03 06:34:10 +00:00
|
|
|
wait = 1000; /* 1 second timeout in msec */
|
1996-05-30 07:20:17 +00:00
|
|
|
while (--wait && ((SEEPROM_INB(sd) & sd->sd_RDY) == 0)) {
|
1996-01-03 06:34:10 +00:00
|
|
|
DELAY (1000); /* delay 1 msec */
|
|
|
|
}
|
1996-05-30 07:20:17 +00:00
|
|
|
if ((SEEPROM_INB(sd) & sd->sd_RDY) == 0) {
|
|
|
|
SEEPROM_OUTB(sd, 0);
|
1996-01-03 06:34:10 +00:00
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
return(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
1996-05-30 07:20:17 +00:00
|
|
|
release_seeprom(sd)
|
|
|
|
struct seeprom_descriptor *sd;
|
1996-01-03 06:34:10 +00:00
|
|
|
{
|
|
|
|
/* Release access to the memory port and the serial EEPROM. */
|
1996-05-30 07:20:17 +00:00
|
|
|
SEEPROM_OUTB(sd, 0);
|
1996-01-03 06:34:10 +00:00
|
|
|
}
|
|
|
|
|
1995-01-13 02:23:27 +00:00
|
|
|
#endif /* NPCI > 0 */
|