diff options
author | mdodd <mdodd@FreeBSD.org> | 1999-08-10 01:03:51 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 1999-08-10 01:03:51 +0000 |
commit | edfdc36b7c3d745ae294cdb844d7886f4e2a57da (patch) | |
tree | cd6db765e9b3b7697d9aff0f349e559f0bfacc04 /sys/i386 | |
parent | d69ca183f0e720874dd03db5d2d266d72d6161c4 (diff) | |
download | FreeBSD-src-edfdc36b7c3d745ae294cdb844d7886f4e2a57da.zip FreeBSD-src-edfdc36b7c3d745ae294cdb844d7886f4e2a57da.tar.gz |
Add support for the Am79C978. (AMD PCHome/PCI Ethernet adapter)
See: http://www.amd.com/products/npd/overview/homenetworking/intro.html
PR: kern/12275
Submitted by: Robert Watson <robert@cyrus.watson.org>
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/isa/ic/Am7990.h | 5 | ||||
-rw-r--r-- | sys/i386/isa/if_lnc.c | 14 | ||||
-rw-r--r-- | sys/i386/isa/if_lnc.h | 5 |
3 files changed, 22 insertions, 2 deletions
diff --git a/sys/i386/isa/ic/Am7990.h b/sys/i386/isa/ic/Am7990.h index fe146ee..82efff9 100644 --- a/sys/i386/isa/ic/Am7990.h +++ b/sys/i386/isa/ic/Am7990.h @@ -24,6 +24,11 @@ #define CSR88 88 #define CSR89 89 +#define BCR49 49 +#define BCR32 32 +#define BCR33 33 +#define BCR34 34 + /* Control and Status Register Masks */ diff --git a/sys/i386/isa/if_lnc.c b/sys/i386/isa/if_lnc.c index 5fc82330..d035311 100644 --- a/sys/i386/isa/if_lnc.c +++ b/sys/i386/isa/if_lnc.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_lnc.c,v 1.60 1999/05/09 23:24:47 peter Exp $ + * $Id: if_lnc.c,v 1.61 1999/07/06 19:22:50 des Exp $ */ /* @@ -151,6 +151,7 @@ static char const * const ic_ident[] = { "PCnet-PCI II", "PCnet-FAST", "PCnet-FAST+", + "PCnet-Home", }; static void lnc_setladrf __P((struct lnc_softc *sc)); @@ -1192,6 +1193,8 @@ pcnet_probe(struct lnc_softc *sc) return (PCnet_FAST); case Am79C972: return (PCnet_FASTplus); + case Am79C978: + return (PCnet_Home); default: break; } @@ -1491,6 +1494,15 @@ lnc_init(struct lnc_softc *sc) /* Give the LANCE the physical address of the initialisation block */ + if (sc->nic.ic == PCnet_Home) { + u_short media; + /* Set PHY_SEL to HomeRun */ + media = read_bcr(sc, BCR49); + media &= ~3; + media |= 1; + write_bcr(sc, BCR49, media); + } + write_csr(sc, CSR1, kvtop(sc->init_block)); write_csr(sc, CSR2, (kvtop(sc->init_block) >> 16) & 0xff); diff --git a/sys/i386/isa/if_lnc.h b/sys/i386/isa/if_lnc.h index b2fc532..aeff426 100644 --- a/sys/i386/isa/if_lnc.h +++ b/sys/i386/isa/if_lnc.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_lnc.h,v 1.10 1999/01/31 00:56:32 paul Exp $ + * $Id: if_lnc.h,v 1.11 1999/07/06 19:22:51 des Exp $ */ #include <i386/isa/ic/Am7990.h> @@ -107,6 +107,8 @@ #define PCnet_PCI_II 8 /* Am79C970A */ #define PCnet_FAST 9 /* Am79C971 */ #define PCnet_FASTplus 10 /* Am79C972 */ +#define PCnet_Home 11 /* Am79C978 */ + /* CSR88-89: Chip ID masks */ #define AMD_MASK 0x003 @@ -119,6 +121,7 @@ #define Am79C970A 0x2621 #define Am79C971 0x2623 #define Am79C972 0x2624 +#define Am79C978 0x2626 /* Board types */ #define UNKNOWN 0 |