diff options
author | Tobias Weingartner <weingart@cvs.openbsd.org> | 2000-01-31 01:50:56 +0000 |
---|---|---|
committer | Tobias Weingartner <weingart@cvs.openbsd.org> | 2000-01-31 01:50:56 +0000 |
commit | c827a625a3d6045d846af0a2d96f0f16bd0fed32 (patch) | |
tree | 6a9f0eedf34b040e2b5a630f12b4e06db5163370 /sys/dev/pci | |
parent | 32f4ef221000444572249016353881f0be0cf193 (diff) |
Add support for 93C66 and 93C56 SEEPROM chips.
Adapted from FreeBSD code.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/ahc_pci.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/pci/ahc_pci.c b/sys/dev/pci/ahc_pci.c index 0d6a9998e53..a4f9091a754 100644 --- a/sys/dev/pci/ahc_pci.c +++ b/sys/dev/pci/ahc_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahc_pci.c,v 1.11 1999/09/22 21:57:08 deraadt Exp $ */ +/* $OpenBSD: ahc_pci.c,v 1.12 2000/01/31 01:50:55 weingart Exp $ */ /* $NetBSD: ahc_pci.c,v 1.9 1996/10/21 22:56:24 thorpej Exp $ */ /* @@ -626,10 +626,14 @@ load_seeprom(ahc) #if defined(__FreeBSD__) sd.sd_iobase = ahc->baseport + SEECTL; #elif defined(__NetBSD__) || defined(__OpenBSD__) - sd.sd_iot = ahc->sc_iot; - sd.sd_ioh = ahc->sc_ioh; - sd.sd_offset = SEECTL; + sd.sd_tag = ahc->sc_iot; + sd.sd_bsh = ahc->sc_ioh; + sd.sd_control_offset = SEECTL; + sd.sd_status_offset = SEECTL; + sd.sd_dataout_offset = SEECTL; #endif + sd.sd_chip = C46; /* XXX - backwards compat */ + sd.sd_MS = SEEMS; sd.sd_RDY = SEERDY; sd.sd_CS = SEECS; @@ -724,10 +728,10 @@ acquire_seeprom(sd) */ SEEPROM_OUTB(sd, sd->sd_MS); wait = 1000; /* 1 second timeout in msec */ - while (--wait && ((SEEPROM_INB(sd) & sd->sd_RDY) == 0)) { + while (--wait && ((SEEPROM_STATUS_INB(sd) & sd->sd_RDY) == 0)) { DELAY (1000); /* delay 1 msec */ } - if ((SEEPROM_INB(sd) & sd->sd_RDY) == 0) { + if ((SEEPROM_STATUS_INB(sd) & sd->sd_RDY) == 0) { SEEPROM_OUTB(sd, 0); return (0); } |