summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_sisreg.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-09-03 07:40:04 +0000
committerphk <phk@FreeBSD.org>2003-09-03 07:40:04 +0000
commitd3c24621a1a99676df4065c385530389d738233a (patch)
tree21e7fc6aed0a6a6fc0ee49c48276ccbe2d98b94f /sys/pci/if_sisreg.h
parent70be9f6715f9864d78de7f207821e5cadfd12c61 (diff)
downloadFreeBSD-src-d3c24621a1a99676df4065c385530389d738233a.zip
FreeBSD-src-d3c24621a1a99676df4065c385530389d738233a.tar.gz
Examine and record the Silicon Revision Register on NS parts.
We can't update the device description in attach (why not ?), so we device_print() what we find. Conditionalize the short cable fix on this being older than rev 16A. Call device_printf() when we apply short cable fix. Include interrupt hold-off setting for rev 16+ under "#ifdef notyet" The device_printf()'s will go under bootverbose once the various issues have settled a bit.
Diffstat (limited to 'sys/pci/if_sisreg.h')
-rw-r--r--sys/pci/if_sisreg.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/pci/if_sisreg.h b/sys/pci/if_sisreg.h
index 97c48f7..fa51a6f 100644
--- a/sys/pci/if_sisreg.h
+++ b/sys/pci/if_sisreg.h
@@ -74,8 +74,10 @@
#define SIS_TIMEUNIT 0xA4
#define SIS_GPIO 0xB8
-/* NS DP83815 registers */
+/* NS DP83815/6 registers */
+#define NS_IHR 0x1C
#define NS_CLKRUN 0x3C
+#define NS_SRR 0x58
#define NS_BMCR 0x80
#define NS_BMSR 0x84
#define NS_PHYIDR1 0x88
@@ -97,6 +99,11 @@
#define NS_CLKRUN_PMEENB 0x00000100
#define NS_CLNRUN_CLKRUN_ENB 0x00000001
+/* NS silicon revisions */
+#define NS_SRR_15C 0x302
+#define NS_SRR_15D 0x403
+#define NS_SRR_16A 0x505
+
#define SIS_CSR_TX_ENABLE 0x00000001
#define SIS_CSR_TX_DISABLE 0x00000002
#define SIS_CSR_RX_ENABLE 0x00000004
@@ -442,6 +449,7 @@ struct sis_mii_frame {
#define SIS_TYPE_900 1
#define SIS_TYPE_7016 2
#define SIS_TYPE_83815 3
+#define SIS_TYPE_83816 4
struct sis_softc {
struct arpcom arpcom; /* interface info */
@@ -450,11 +458,13 @@ struct sis_softc {
struct resource *sis_res;
struct resource *sis_irq;
void *sis_intrhand;
+ device_t sis_self;
device_t sis_miibus;
u_int8_t sis_unit;
u_int8_t sis_type;
u_int8_t sis_rev;
u_int8_t sis_link;
+ u_int sis_srr;
struct sis_list_data sis_ldata;
bus_dma_tag_t sis_parent_tag;
bus_dma_tag_t sis_tag;
OpenPOWER on IntegriCloud