summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_sisreg.h
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2000-07-06 06:02:04 +0000
committerwpaul <wpaul@FreeBSD.org>2000-07-06 06:02:04 +0000
commit966a32cd5be7d251249d23eed9b6f23015e0907c (patch)
tree686dc936281e02259b748195c1a13cb004e0a59f /sys/pci/if_sisreg.h
parentba16109118a0985a50a5780377fab30a9fea33ad (diff)
downloadFreeBSD-src-966a32cd5be7d251249d23eed9b6f23015e0907c.zip
FreeBSD-src-966a32cd5be7d251249d23eed9b6f23015e0907c.tar.gz
Add support for the National Semiconductor DP83815 fast ethernet
controller chip. This chip is currently being used on the NetGear FA312-TX adapter, which I guess is a replacement for the FA310-TX (PNIC-based). I added support for this chip by modifying the sis driver since the SiS 900 and the NS DP83815 have almost the same programming interface (the RX filter programming and PHY access methods are different, but the general configuration, DMA scheme and register layout are identical). I would have had this done a lot sooner, but getting the damn MAC address out of the EEPROM proved to be more complicated than expected.
Diffstat (limited to 'sys/pci/if_sisreg.h')
-rw-r--r--sys/pci/if_sisreg.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/pci/if_sisreg.h b/sys/pci/if_sisreg.h
index cef3a52..a74dc3b 100644
--- a/sys/pci/if_sisreg.h
+++ b/sys/pci/if_sisreg.h
@@ -74,6 +74,16 @@
#define SIS_TIMEUNIT 0xA4
#define SIS_GPIO 0xB8
+/* NS DP83815 registers */
+#define NS_BMCR 0x80
+#define NS_BMSR 0x84
+#define NS_PHYIDR1 0x88
+#define NS_PHYIDR2 0x8C
+#define NS_ANAR 0x90
+#define NS_ANLPAR 0x94
+#define NS_ANER 0x98
+#define NS_ANNPTR 0x9C
+
#define SIS_CSR_TX_ENABLE 0x00000001
#define SIS_CSR_TX_DISABLE 0x00000002
#define SIS_CSR_RX_ENABLE 0x00000004
@@ -100,6 +110,7 @@
#define SIS_EECMD_ERASE 0x1c0
#define SIS_EE_NODEADDR 0x8
+#define NS_EE_NODEADDR 0x6
#define SIS_PCICTL_SRAMADDR 0x0000001F
#define SIS_PCICTL_RAMTSTENB 0x00000020
@@ -220,6 +231,9 @@
(SIS_RXCFG_DRAIN(64)|SIS_RXDMA_256BYTES)
#define SIS_RXFILTCTL_ADDR 0x000F0000
+#define NS_RXFILTCTL_MCHASH 0x00200000
+#define NS_RXFILTCTL_ARP 0x00400000
+#define NS_RXFILTCTL_PERFECT 0x08000000
#define SIS_RXFILTCTL_ALLPHYS 0x10000000
#define SIS_RXFILTCTL_ALLMULTI 0x20000000
#define SIS_RXFILTCTL_BROAD 0x40000000
@@ -237,6 +251,13 @@
#define SIS_FILTADDR_MAR6 0x000A0000
#define SIS_FILTADDR_MAR7 0x000B0000
+#define NS_FILTADDR_PAR0 0x00000000
+#define NS_FILTADDR_PAR1 0x00000002
+#define NS_FILTADDR_PAR2 0x00000004
+
+#define NS_FILTADDR_FMEM_LO 0x00000200
+#define NS_FILTADDR_FMEM_HI 0x000003FE
+
/*
* DMA descriptor structures. The first part of the descriptor
* is the hardware descriptor format, which is just three longwords.
@@ -322,6 +343,16 @@ struct sis_ring_data {
#define SIS_DEVICEID_900 0x0900
#define SIS_DEVICEID_7016 0x7016
+/*
+ * NatSemi vendor ID
+ */
+#define NS_VENDORID 0x100B
+
+/*
+ * DP83815 device ID
+ */
+#define NS_DEVICEID_DP83815 0x0020
+
struct sis_type {
u_int16_t sis_vid;
u_int16_t sis_did;
@@ -330,6 +361,7 @@ struct sis_type {
#define SIS_TYPE_900 1
#define SIS_TYPE_7016 2
+#define SIS_TYPE_83815 3
struct sis_softc {
struct arpcom arpcom; /* interface info */
OpenPOWER on IntegriCloud