aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bge/if_bgereg.h
diff options
context:
space:
mode:
authorPaul Saab <ps@FreeBSD.org>2003-05-07 21:51:13 +0000
committerPaul Saab <ps@FreeBSD.org>2003-05-07 21:51:13 +0000
commite0ced696665e3af6622c8fad18f854c06b4f95f8 (patch)
treef33f644d05c825c721075ee98c5ac5fa21f47564 /sys/dev/bge/if_bgereg.h
parent8340d5bcaef558c8068eea41fd0270b06b6e2e2f (diff)
downloadsrc-e0ced696665e3af6622c8fad18f854c06b4f95f8.tar.gz
src-e0ced696665e3af6622c8fad18f854c06b4f95f8.zip
- Change the full Asic revision defines to CHIPID to better since the
ASIC revision is really the major number of the CHIPID. Also store the chipid, asic rev and chip revision in the softc for later use. - The write twice to send producer index workaround only applies to the 5700_BX chips, so only do it there. Requested by: jdp - Do not initalize the LED's to 0x00. The default configuration the chip comes up in should yeild proper operation of the LED's. Confirmed by: John Cagle <john.cagle@hp.com> Approved by: re (blanket)
Notes
Notes: svn path=/head/; revision=114813
Diffstat (limited to 'sys/dev/bge/if_bgereg.h')
-rw-r--r--sys/dev/bge/if_bgereg.h45
1 files changed, 27 insertions, 18 deletions
diff --git a/sys/dev/bge/if_bgereg.h b/sys/dev/bge/if_bgereg.h
index 58f6215fde5b..648b0859a4f6 100644
--- a/sys/dev/bge/if_bgereg.h
+++ b/sys/dev/bge/if_bgereg.h
@@ -212,23 +212,23 @@
(BGE_PCIMISCCTL_CLEAR_INTA|BGE_PCIMISCCTL_MASK_PCI_INTR| \
BGE_PCIMISCCTL_ENDIAN_WORDSWAP|BGE_PCIMISCCTL_INDIRECT_ACCESS)
-#define BGE_ASICREV_TIGON_I 0x40000000
-#define BGE_ASICREV_TIGON_II 0x60000000
-#define BGE_ASICREV_BCM5700_B0 0x71000000
-#define BGE_ASICREV_BCM5700_B1 0x71020000
-#define BGE_ASICREV_BCM5700_B2 0x71030000
-#define BGE_ASICREV_BCM5700_ALTIMA 0x71040000
-#define BGE_ASICREV_BCM5700_C0 0x72000000
-#define BGE_ASICREV_BCM5701_A0 0x00000000 /* grrrr */
-#define BGE_ASICREV_BCM5701_B0 0x01000000
-#define BGE_ASICREV_BCM5701_B2 0x01020000
-#define BGE_ASICREV_BCM5701_B5 0x01050000
-#define BGE_ASICREV_BCM5703_A0 0x10000000
-#define BGE_ASICREV_BCM5703_A1 0x10010000
-#define BGE_ASICREV_BCM5703_A2 0x10020000
-#define BGE_ASICREV_BCM5704_A0 0x20000000
-#define BGE_ASICREV_BCM5704_A1 0x20010000
-#define BGE_ASICREV_BCM5704_A2 0x20020000
+#define BGE_CHIPID_TIGON_I 0x40000000
+#define BGE_CHIPID_TIGON_II 0x60000000
+#define BGE_CHIPID_BCM5700_B0 0x71000000
+#define BGE_CHIPID_BCM5700_B1 0x71020000
+#define BGE_CHIPID_BCM5700_B2 0x71030000
+#define BGE_CHIPID_BCM5700_ALTIMA 0x71040000
+#define BGE_CHIPID_BCM5700_C0 0x72000000
+#define BGE_CHIPID_BCM5701_A0 0x00000000 /* grrrr */
+#define BGE_CHIPID_BCM5701_B0 0x01000000
+#define BGE_CHIPID_BCM5701_B2 0x01020000
+#define BGE_CHIPID_BCM5701_B5 0x01050000
+#define BGE_CHIPID_BCM5703_A0 0x10000000
+#define BGE_CHIPID_BCM5703_A1 0x10010000
+#define BGE_CHIPID_BCM5703_A2 0x10020000
+#define BGE_CHIPID_BCM5704_A0 0x20000000
+#define BGE_CHIPID_BCM5704_A1 0x20010000
+#define BGE_CHIPID_BCM5704_A2 0x20020000
/* shorthand one */
#define BGE_ASICREV(x) ((x) >> 28)
@@ -237,6 +237,13 @@
#define BGE_ASICREV_BCM5703 0x01
#define BGE_ASICREV_BCM5704 0x02
+/* chip revisions */
+#define BGE_CHIPREV(x) ((x) >> 24)
+#define BGE_CHIPREV_5700_AX 0x70
+#define BGE_CHIPREV_5700_BX 0x71
+#define BGE_CHIPREV_5700_CX 0x72
+#define BGE_CHIPREV_5701_AX 0x00
+
/* PCI DMA Read/Write Control register */
#define BGE_PCIDMARWCTL_MINDMA 0x000000FF
#define BGE_PCIDMARWCTL_RDADRR_BNDRY 0x00000700
@@ -2135,7 +2142,9 @@ struct bge_softc {
u_int8_t bge_extram; /* has external SSRAM */
u_int8_t bge_tbi;
u_int8_t bge_rx_alignment_bug;
- u_int32_t bge_asicrev;
+ u_int32_t bge_chipid;
+ u_int8_t bge_asicrev;
+ u_int8_t bge_chiprev;
struct bge_ring_data *bge_rdata; /* rings */
struct bge_chain_data bge_cdata; /* mbufs */
u_int16_t bge_tx_saved_considx;