MFp4: Merge in AX88790 support from my p4 tree. I've had this in my

tree since 2003/02/20, and I recently cleaned it up.  I'd even closed
the PR that I obtained this from Fri Jul 18 23:25:08 MDT 2003 since
I looked at my p4 tree.

PR: 46889
Submitted by: HASEGAWA Tomoki
This commit is contained in:
Warner Losh 2005-02-14 06:47:22 +00:00
parent f8d201b879
commit f3fe05f878
2 changed files with 17 additions and 3 deletions

View File

@ -477,13 +477,17 @@ ed_pccard_ax88190(device_t dev)
iobase = rman_get_start(sc->port_res);
ed_pccard_memwrite(dev, ED_AX88190_IOBASE0, iobase & 0xff);
ed_pccard_memwrite(dev, ED_AX88190_IOBASE1, (iobase >> 8) & 0xff);
sc->type_str = "AX88190";
if (ed_asic_inb(sc, ED_ASIX_TEST) != 0) {
ed_pccard_memwrite(dev, ED_AX88790_CSR, ED_AX88790_CSR_PWRDWN);
sc->type_str = "AX88790";
}
ax88190_geteprom(sc);
ed_release_resources(dev);
error = ed_probe_Novell(dev, 0, flags);
if (error == 0) {
sc->vendor = ED_VENDOR_NOVELL;
sc->type = ED_TYPE_NE2000;
sc->type_str = "AX88190";
}
return (error);
}

View File

@ -1117,12 +1117,22 @@ struct ed_ring {
#define ED_CHIP_TYPE_DL100XX 0x03
/*
* AX88190 IOBASE registers.
* AX88190 configuration status register.
*/
#define ED_AX88790_CSR 0x3c2
#define ED_AX88790_CSR_PWRDWN 0x04
/*
* AX88190 IOBASE registers, I'm pretty sure these don't need to be written
* to to make the card work by ed.
*/
#define ED_AX88190_IOBASE0 0x3ca
#define ED_AX88190_IOBASE1 0x3cc
/*
* Test for AX88790 vs 88190 cards.
*/
#define ED_ASIX_TEST 0x05
/*
* MII bus definitions.
*/