aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/e1000_defines.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/net/igb/e1000_defines.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'drivers/net/igb/e1000_defines.h')
-rw-r--r--drivers/net/igb/e1000_defines.h90
1 files changed, 89 insertions, 1 deletions
diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
index bbd2ec308eb0..6b80d40110ca 100644
--- a/drivers/net/igb/e1000_defines.h
+++ b/drivers/net/igb/e1000_defines.h
@@ -51,6 +51,7 @@
51#define E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES 0x00C00000 51#define E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES 0x00C00000
52#define E1000_CTRL_EXT_LINK_MODE_1000BASE_KX 0x00400000 52#define E1000_CTRL_EXT_LINK_MODE_1000BASE_KX 0x00400000
53#define E1000_CTRL_EXT_LINK_MODE_SGMII 0x00800000 53#define E1000_CTRL_EXT_LINK_MODE_SGMII 0x00800000
54#define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000
54#define E1000_CTRL_EXT_EIAME 0x01000000 55#define E1000_CTRL_EXT_EIAME 0x01000000
55#define E1000_CTRL_EXT_IRCA 0x00000001 56#define E1000_CTRL_EXT_IRCA 0x00000001
56/* Interrupt delay cancellation */ 57/* Interrupt delay cancellation */
@@ -110,6 +111,7 @@
110/* Management Control */ 111/* Management Control */
111#define E1000_MANC_SMBUS_EN 0x00000001 /* SMBus Enabled - RO */ 112#define E1000_MANC_SMBUS_EN 0x00000001 /* SMBus Enabled - RO */
112#define E1000_MANC_ASF_EN 0x00000002 /* ASF Enabled - RO */ 113#define E1000_MANC_ASF_EN 0x00000002 /* ASF Enabled - RO */
114#define E1000_MANC_EN_BMC2OS 0x10000000 /* OSBMC is Enabled or not */
113/* Enable Neighbor Discovery Filtering */ 115/* Enable Neighbor Discovery Filtering */
114#define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */ 116#define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */
115#define E1000_MANC_BLK_PHY_RST_ON_IDE 0x00040000 /* Block phy resets */ 117#define E1000_MANC_BLK_PHY_RST_ON_IDE 0x00040000 /* Block phy resets */
@@ -286,7 +288,34 @@
286#define E1000_TCTL_COLD 0x003ff000 /* collision distance */ 288#define E1000_TCTL_COLD 0x003ff000 /* collision distance */
287#define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */ 289#define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */
288 290
289/* Transmit Arbitration Count */ 291/* DMA Coalescing register fields */
292#define E1000_DMACR_DMACWT_MASK 0x00003FFF /* DMA Coalescing
293 * Watchdog Timer */
294#define E1000_DMACR_DMACTHR_MASK 0x00FF0000 /* DMA Coalescing Receive
295 * Threshold */
296#define E1000_DMACR_DMACTHR_SHIFT 16
297#define E1000_DMACR_DMAC_LX_MASK 0x30000000 /* Lx when no PCIe
298 * transactions */
299#define E1000_DMACR_DMAC_LX_SHIFT 28
300#define E1000_DMACR_DMAC_EN 0x80000000 /* Enable DMA Coalescing */
301
302#define E1000_DMCTXTH_DMCTTHR_MASK 0x00000FFF /* DMA Coalescing Transmit
303 * Threshold */
304
305#define E1000_DMCTLX_TTLX_MASK 0x00000FFF /* Time to LX request */
306
307#define E1000_DMCRTRH_UTRESH_MASK 0x0007FFFF /* Receive Traffic Rate
308 * Threshold */
309#define E1000_DMCRTRH_LRPRCW 0x80000000 /* Rcv packet rate in
310 * current window */
311
312#define E1000_DMCCNT_CCOUNT_MASK 0x01FFFFFF /* DMA Coal Rcv Traffic
313 * Current Cnt */
314
315#define E1000_FCRTC_RTH_COAL_MASK 0x0003FFF0 /* Flow ctrl Rcv Threshold
316 * High val */
317#define E1000_FCRTC_RTH_COAL_SHIFT 4
318#define E1000_PCIEMISC_LX_DECISION 0x00000080 /* Lx power decision */
290 319
291/* SerDes Control */ 320/* SerDes Control */
292#define E1000_SCTL_DISABLE_SERDES_LOOPBACK 0x0400 321#define E1000_SCTL_DISABLE_SERDES_LOOPBACK 0x0400
@@ -419,6 +448,9 @@
419#define E1000_ERR_SWFW_SYNC 13 448#define E1000_ERR_SWFW_SYNC 13
420#define E1000_NOT_IMPLEMENTED 14 449#define E1000_NOT_IMPLEMENTED 14
421#define E1000_ERR_MBX 15 450#define E1000_ERR_MBX 15
451#define E1000_ERR_INVALID_ARGUMENT 16
452#define E1000_ERR_NO_SPACE 17
453#define E1000_ERR_NVM_PBA_SECTION 18
422 454
423/* Loop limit on how long we wait for auto-negotiation to complete */ 455/* Loop limit on how long we wait for auto-negotiation to complete */
424#define COPPER_LINK_UP_LIMIT 10 456#define COPPER_LINK_UP_LIMIT 10
@@ -562,6 +594,8 @@
562#define NVM_INIT_CONTROL3_PORT_A 0x0024 594#define NVM_INIT_CONTROL3_PORT_A 0x0024
563#define NVM_ALT_MAC_ADDR_PTR 0x0037 595#define NVM_ALT_MAC_ADDR_PTR 0x0037
564#define NVM_CHECKSUM_REG 0x003F 596#define NVM_CHECKSUM_REG 0x003F
597#define NVM_COMPATIBILITY_REG_3 0x0003
598#define NVM_COMPATIBILITY_BIT_MASK 0x8000
565 599
566#define E1000_NVM_CFG_DONE_PORT_0 0x040000 /* MNG config cycle done */ 600#define E1000_NVM_CFG_DONE_PORT_0 0x040000 /* MNG config cycle done */
567#define E1000_NVM_CFG_DONE_PORT_1 0x080000 /* ...for second port */ 601#define E1000_NVM_CFG_DONE_PORT_1 0x080000 /* ...for second port */
@@ -580,11 +614,15 @@
580 614
581/* Mask bits for fields in Word 0x1a of the NVM */ 615/* Mask bits for fields in Word 0x1a of the NVM */
582 616
617/* length of string needed to store part num */
618#define E1000_PBANUM_LENGTH 11
619
583/* For checksumming, the sum of all words in the NVM should equal 0xBABA. */ 620/* For checksumming, the sum of all words in the NVM should equal 0xBABA. */
584#define NVM_SUM 0xBABA 621#define NVM_SUM 0xBABA
585 622
586#define NVM_PBA_OFFSET_0 8 623#define NVM_PBA_OFFSET_0 8
587#define NVM_PBA_OFFSET_1 9 624#define NVM_PBA_OFFSET_1 9
625#define NVM_PBA_PTR_GUARD 0xFAFA
588#define NVM_WORD_SIZE_BASE_SHIFT 6 626#define NVM_WORD_SIZE_BASE_SHIFT 6
589 627
590/* NVM Commands - Microwire */ 628/* NVM Commands - Microwire */
@@ -592,6 +630,7 @@
592/* NVM Commands - SPI */ 630/* NVM Commands - SPI */
593#define NVM_MAX_RETRY_SPI 5000 /* Max wait of 5ms, for RDY signal */ 631#define NVM_MAX_RETRY_SPI 5000 /* Max wait of 5ms, for RDY signal */
594#define NVM_WRITE_OPCODE_SPI 0x02 /* NVM write opcode */ 632#define NVM_WRITE_OPCODE_SPI 0x02 /* NVM write opcode */
633#define NVM_READ_OPCODE_SPI 0x03 /* NVM read opcode */
595#define NVM_A8_OPCODE_SPI 0x08 /* opcode bit-3 = address bit-8 */ 634#define NVM_A8_OPCODE_SPI 0x08 /* opcode bit-3 = address bit-8 */
596#define NVM_WREN_OPCODE_SPI 0x06 /* NVM set Write Enable latch */ 635#define NVM_WREN_OPCODE_SPI 0x06 /* NVM set Write Enable latch */
597#define NVM_RDSR_OPCODE_SPI 0x05 /* NVM read Status register */ 636#define NVM_RDSR_OPCODE_SPI 0x05 /* NVM read Status register */
@@ -634,6 +673,8 @@
634 * E = External 673 * E = External
635 */ 674 */
636#define M88E1111_I_PHY_ID 0x01410CC0 675#define M88E1111_I_PHY_ID 0x01410CC0
676#define M88E1112_E_PHY_ID 0x01410C90
677#define I347AT4_E_PHY_ID 0x01410DC0
637#define IGP03E1000_E_PHY_ID 0x02A80390 678#define IGP03E1000_E_PHY_ID 0x02A80390
638#define I82580_I_PHY_ID 0x015403A0 679#define I82580_I_PHY_ID 0x015403A0
639#define I350_I_PHY_ID 0x015403B0 680#define I350_I_PHY_ID 0x015403B0
@@ -702,6 +743,35 @@
702#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X 0x0100 743#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X 0x0100
703#define M88E1000_EPSCR_TX_CLK_25 0x0070 /* 25 MHz TX_CLK */ 744#define M88E1000_EPSCR_TX_CLK_25 0x0070 /* 25 MHz TX_CLK */
704 745
746/* Intel i347-AT4 Registers */
747
748#define I347AT4_PCDL 0x10 /* PHY Cable Diagnostics Length */
749#define I347AT4_PCDC 0x15 /* PHY Cable Diagnostics Control */
750#define I347AT4_PAGE_SELECT 0x16
751
752/* i347-AT4 Extended PHY Specific Control Register */
753
754/*
755 * Number of times we will attempt to autonegotiate before downshifting if we
756 * are the master
757 */
758#define I347AT4_PSCR_DOWNSHIFT_ENABLE 0x0800
759#define I347AT4_PSCR_DOWNSHIFT_MASK 0x7000
760#define I347AT4_PSCR_DOWNSHIFT_1X 0x0000
761#define I347AT4_PSCR_DOWNSHIFT_2X 0x1000
762#define I347AT4_PSCR_DOWNSHIFT_3X 0x2000
763#define I347AT4_PSCR_DOWNSHIFT_4X 0x3000
764#define I347AT4_PSCR_DOWNSHIFT_5X 0x4000
765#define I347AT4_PSCR_DOWNSHIFT_6X 0x5000
766#define I347AT4_PSCR_DOWNSHIFT_7X 0x6000
767#define I347AT4_PSCR_DOWNSHIFT_8X 0x7000
768
769/* i347-AT4 PHY Cable Diagnostics Control */
770#define I347AT4_PCDC_CABLE_LENGTH_UNIT 0x0400 /* 0=cm 1=meters */
771
772/* Marvell 1112 only registers */
773#define M88E1112_VCT_DSP_DISTANCE 0x001A
774
705/* M88EC018 Rev 2 specific DownShift settings */ 775/* M88EC018 Rev 2 specific DownShift settings */
706#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK 0x0E00 776#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK 0x0E00
707#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X 0x0800 777#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X 0x0800
@@ -719,6 +789,17 @@
719#define E1000_MDIC_ERROR 0x40000000 789#define E1000_MDIC_ERROR 0x40000000
720#define E1000_MDIC_DEST 0x80000000 790#define E1000_MDIC_DEST 0x80000000
721 791
792/* Thermal Sensor */
793#define E1000_THSTAT_PWR_DOWN 0x00000001 /* Power Down Event */
794#define E1000_THSTAT_LINK_THROTTLE 0x00000002 /* Link Speed Throttle Event */
795
796/* Energy Efficient Ethernet */
797#define E1000_IPCNFG_EEE_1G_AN 0x00000008 /* EEE Enable 1G AN */
798#define E1000_IPCNFG_EEE_100M_AN 0x00000004 /* EEE Enable 100M AN */
799#define E1000_EEER_TX_LPI_EN 0x00010000 /* EEE Tx LPI Enable */
800#define E1000_EEER_RX_LPI_EN 0x00020000 /* EEE Rx LPI Enable */
801#define E1000_EEER_LPI_FC 0x00040000 /* EEE Enable on FC */
802
722/* SerDes Control */ 803/* SerDes Control */
723#define E1000_GEN_CTL_READY 0x80000000 804#define E1000_GEN_CTL_READY 0x80000000
724#define E1000_GEN_CTL_ADDRESS_SHIFT 8 805#define E1000_GEN_CTL_ADDRESS_SHIFT 8
@@ -732,4 +813,11 @@
732#define E1000_PCIEMISC_LX_DECISION 0x00000080 /* Lx power decision based 813#define E1000_PCIEMISC_LX_DECISION 0x00000080 /* Lx power decision based
733 on DMA coal */ 814 on DMA coal */
734 815
816/* Tx Rate-Scheduler Config fields */
817#define E1000_RTTBCNRC_RS_ENA 0x80000000
818#define E1000_RTTBCNRC_RF_DEC_MASK 0x00003FFF
819#define E1000_RTTBCNRC_RF_INT_SHIFT 14
820#define E1000_RTTBCNRC_RF_INT_MASK \
821 (E1000_RTTBCNRC_RF_DEC_MASK << E1000_RTTBCNRC_RF_INT_SHIFT)
822
735#endif 823#endif