aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000e/defines.h')
-rw-r--r--drivers/net/e1000e/defines.h109
1 files changed, 58 insertions, 51 deletions
diff --git a/drivers/net/e1000e/defines.h b/drivers/net/e1000e/defines.h
index a4f511f549f7..572cfd44397a 100644
--- a/drivers/net/e1000e/defines.h
+++ b/drivers/net/e1000e/defines.h
@@ -1,7 +1,7 @@
1/******************************************************************************* 1/*******************************************************************************
2 2
3 Intel PRO/1000 Linux driver 3 Intel PRO/1000 Linux driver
4 Copyright(c) 1999 - 2007 Intel Corporation. 4 Copyright(c) 1999 - 2008 Intel Corporation.
5 5
6 This program is free software; you can redistribute it and/or modify it 6 This program is free software; you can redistribute it and/or modify it
7 under the terms and conditions of the GNU General Public License, 7 under the terms and conditions of the GNU General Public License,
@@ -120,10 +120,10 @@
120#define E1000_MANC_ARP_EN 0x00002000 /* Enable ARP Request Filtering */ 120#define E1000_MANC_ARP_EN 0x00002000 /* Enable ARP Request Filtering */
121#define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */ 121#define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */
122#define E1000_MANC_BLK_PHY_RST_ON_IDE 0x00040000 /* Block phy resets */ 122#define E1000_MANC_BLK_PHY_RST_ON_IDE 0x00040000 /* Block phy resets */
123#define E1000_MANC_EN_MAC_ADDR_FILTER 0x00100000 /* Enable MAC address 123/* Enable MAC address filtering */
124 * filtering */ 124#define E1000_MANC_EN_MAC_ADDR_FILTER 0x00100000
125#define E1000_MANC_EN_MNG2HOST 0x00200000 /* Enable MNG packets to host 125/* Enable MNG packets to host memory */
126 * memory */ 126#define E1000_MANC_EN_MNG2HOST 0x00200000
127 127
128/* Receive Control */ 128/* Receive Control */
129#define E1000_RCTL_EN 0x00000002 /* enable */ 129#define E1000_RCTL_EN 0x00000002 /* enable */
@@ -135,25 +135,26 @@
135#define E1000_RCTL_LBM_MAC 0x00000040 /* MAC loopback mode */ 135#define E1000_RCTL_LBM_MAC 0x00000040 /* MAC loopback mode */
136#define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */ 136#define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */
137#define E1000_RCTL_DTYP_PS 0x00000400 /* Packet Split descriptor */ 137#define E1000_RCTL_DTYP_PS 0x00000400 /* Packet Split descriptor */
138#define E1000_RCTL_RDMTS_HALF 0x00000000 /* rx desc min threshold size */ 138#define E1000_RCTL_RDMTS_HALF 0x00000000 /* Rx desc min threshold size */
139#define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */ 139#define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */
140#define E1000_RCTL_BAM 0x00008000 /* broadcast enable */ 140#define E1000_RCTL_BAM 0x00008000 /* broadcast enable */
141/* these buffer sizes are valid if E1000_RCTL_BSEX is 0 */ 141/* these buffer sizes are valid if E1000_RCTL_BSEX is 0 */
142#define E1000_RCTL_SZ_2048 0x00000000 /* rx buffer size 2048 */ 142#define E1000_RCTL_SZ_2048 0x00000000 /* Rx buffer size 2048 */
143#define E1000_RCTL_SZ_1024 0x00010000 /* rx buffer size 1024 */ 143#define E1000_RCTL_SZ_1024 0x00010000 /* Rx buffer size 1024 */
144#define E1000_RCTL_SZ_512 0x00020000 /* rx buffer size 512 */ 144#define E1000_RCTL_SZ_512 0x00020000 /* Rx buffer size 512 */
145#define E1000_RCTL_SZ_256 0x00030000 /* rx buffer size 256 */ 145#define E1000_RCTL_SZ_256 0x00030000 /* Rx buffer size 256 */
146/* these buffer sizes are valid if E1000_RCTL_BSEX is 1 */ 146/* these buffer sizes are valid if E1000_RCTL_BSEX is 1 */
147#define E1000_RCTL_SZ_16384 0x00010000 /* rx buffer size 16384 */ 147#define E1000_RCTL_SZ_16384 0x00010000 /* Rx buffer size 16384 */
148#define E1000_RCTL_SZ_8192 0x00020000 /* rx buffer size 8192 */ 148#define E1000_RCTL_SZ_8192 0x00020000 /* Rx buffer size 8192 */
149#define E1000_RCTL_SZ_4096 0x00030000 /* rx buffer size 4096 */ 149#define E1000_RCTL_SZ_4096 0x00030000 /* Rx buffer size 4096 */
150#define E1000_RCTL_VFE 0x00040000 /* vlan filter enable */ 150#define E1000_RCTL_VFE 0x00040000 /* vlan filter enable */
151#define E1000_RCTL_CFIEN 0x00080000 /* canonical form enable */ 151#define E1000_RCTL_CFIEN 0x00080000 /* canonical form enable */
152#define E1000_RCTL_CFI 0x00100000 /* canonical form indicator */ 152#define E1000_RCTL_CFI 0x00100000 /* canonical form indicator */
153#define E1000_RCTL_BSEX 0x02000000 /* Buffer size extension */ 153#define E1000_RCTL_BSEX 0x02000000 /* Buffer size extension */
154#define E1000_RCTL_SECRC 0x04000000 /* Strip Ethernet CRC */ 154#define E1000_RCTL_SECRC 0x04000000 /* Strip Ethernet CRC */
155 155
156/* Use byte values for the following shift parameters 156/*
157 * Use byte values for the following shift parameters
157 * Usage: 158 * Usage:
158 * psrctl |= (((ROUNDUP(value0, 128) >> E1000_PSRCTL_BSIZE0_SHIFT) & 159 * psrctl |= (((ROUNDUP(value0, 128) >> E1000_PSRCTL_BSIZE0_SHIFT) &
159 * E1000_PSRCTL_BSIZE0_MASK) | 160 * E1000_PSRCTL_BSIZE0_MASK) |
@@ -206,7 +207,8 @@
206#define E1000_CTRL_VME 0x40000000 /* IEEE VLAN mode enable */ 207#define E1000_CTRL_VME 0x40000000 /* IEEE VLAN mode enable */
207#define E1000_CTRL_PHY_RST 0x80000000 /* PHY Reset */ 208#define E1000_CTRL_PHY_RST 0x80000000 /* PHY Reset */
208 209
209/* Bit definitions for the Management Data IO (MDIO) and Management Data 210/*
211 * Bit definitions for the Management Data IO (MDIO) and Management Data
210 * Clock (MDC) pins in the Device Control Register. 212 * Clock (MDC) pins in the Device Control Register.
211 */ 213 */
212 214
@@ -279,7 +281,7 @@
279#define E1000_TXD_STAT_TC 0x00000004 /* Tx Underrun */ 281#define E1000_TXD_STAT_TC 0x00000004 /* Tx Underrun */
280 282
281/* Transmit Control */ 283/* Transmit Control */
282#define E1000_TCTL_EN 0x00000002 /* enable tx */ 284#define E1000_TCTL_EN 0x00000002 /* enable Tx */
283#define E1000_TCTL_PSP 0x00000008 /* pad short packets */ 285#define E1000_TCTL_PSP 0x00000008 /* pad short packets */
284#define E1000_TCTL_CT 0x00000ff0 /* collision threshold */ 286#define E1000_TCTL_CT 0x00000ff0 /* collision threshold */
285#define E1000_TCTL_COLD 0x003ff000 /* collision distance */ 287#define E1000_TCTL_COLD 0x003ff000 /* collision distance */
@@ -337,8 +339,8 @@
337#define E1000_KABGTXD_BGSQLBIAS 0x00050000 339#define E1000_KABGTXD_BGSQLBIAS 0x00050000
338 340
339/* PBA constants */ 341/* PBA constants */
340#define E1000_PBA_8K 0x0008 /* 8KB, default Rx allocation */ 342#define E1000_PBA_8K 0x0008 /* 8KB */
341#define E1000_PBA_16K 0x0010 /* 16KB, default TX allocation */ 343#define E1000_PBA_16K 0x0010 /* 16KB */
342 344
343#define E1000_PBS_16K E1000_PBA_16K 345#define E1000_PBS_16K E1000_PBA_16K
344 346
@@ -356,12 +358,13 @@
356/* Interrupt Cause Read */ 358/* Interrupt Cause Read */
357#define E1000_ICR_TXDW 0x00000001 /* Transmit desc written back */ 359#define E1000_ICR_TXDW 0x00000001 /* Transmit desc written back */
358#define E1000_ICR_LSC 0x00000004 /* Link Status Change */ 360#define E1000_ICR_LSC 0x00000004 /* Link Status Change */
359#define E1000_ICR_RXSEQ 0x00000008 /* rx sequence error */ 361#define E1000_ICR_RXSEQ 0x00000008 /* Rx sequence error */
360#define E1000_ICR_RXDMT0 0x00000010 /* rx desc min. threshold (0) */ 362#define E1000_ICR_RXDMT0 0x00000010 /* Rx desc min. threshold (0) */
361#define E1000_ICR_RXT0 0x00000080 /* rx timer intr (ring 0) */ 363#define E1000_ICR_RXT0 0x00000080 /* Rx timer intr (ring 0) */
362#define E1000_ICR_INT_ASSERTED 0x80000000 /* If this bit asserted, the driver should claim the interrupt */ 364#define E1000_ICR_INT_ASSERTED 0x80000000 /* If this bit asserted, the driver should claim the interrupt */
363 365
364/* This defines the bits that are set in the Interrupt Mask 366/*
367 * This defines the bits that are set in the Interrupt Mask
365 * Set/Read Register. Each bit is documented below: 368 * Set/Read Register. Each bit is documented below:
366 * o RXT0 = Receiver Timer Interrupt (ring 0) 369 * o RXT0 = Receiver Timer Interrupt (ring 0)
367 * o TXDW = Transmit Descriptor Written Back 370 * o TXDW = Transmit Descriptor Written Back
@@ -379,21 +382,22 @@
379/* Interrupt Mask Set */ 382/* Interrupt Mask Set */
380#define E1000_IMS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ 383#define E1000_IMS_TXDW E1000_ICR_TXDW /* Transmit desc written back */
381#define E1000_IMS_LSC E1000_ICR_LSC /* Link Status Change */ 384#define E1000_IMS_LSC E1000_ICR_LSC /* Link Status Change */
382#define E1000_IMS_RXSEQ E1000_ICR_RXSEQ /* rx sequence error */ 385#define E1000_IMS_RXSEQ E1000_ICR_RXSEQ /* Rx sequence error */
383#define E1000_IMS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ 386#define E1000_IMS_RXDMT0 E1000_ICR_RXDMT0 /* Rx desc min. threshold */
384#define E1000_IMS_RXT0 E1000_ICR_RXT0 /* rx timer intr */ 387#define E1000_IMS_RXT0 E1000_ICR_RXT0 /* Rx timer intr */
385 388
386/* Interrupt Cause Set */ 389/* Interrupt Cause Set */
387#define E1000_ICS_LSC E1000_ICR_LSC /* Link Status Change */ 390#define E1000_ICS_LSC E1000_ICR_LSC /* Link Status Change */
388#define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ 391#define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */
392#define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* Rx desc min. threshold */
389 393
390/* Transmit Descriptor Control */ 394/* Transmit Descriptor Control */
391#define E1000_TXDCTL_PTHRESH 0x0000003F /* TXDCTL Prefetch Threshold */ 395#define E1000_TXDCTL_PTHRESH 0x0000003F /* TXDCTL Prefetch Threshold */
392#define E1000_TXDCTL_WTHRESH 0x003F0000 /* TXDCTL Writeback Threshold */ 396#define E1000_TXDCTL_WTHRESH 0x003F0000 /* TXDCTL Writeback Threshold */
393#define E1000_TXDCTL_FULL_TX_DESC_WB 0x01010000 /* GRAN=1, WTHRESH=1 */ 397#define E1000_TXDCTL_FULL_TX_DESC_WB 0x01010000 /* GRAN=1, WTHRESH=1 */
394#define E1000_TXDCTL_MAX_TX_DESC_PREFETCH 0x0100001F /* GRAN=1, PTHRESH=31 */ 398#define E1000_TXDCTL_MAX_TX_DESC_PREFETCH 0x0100001F /* GRAN=1, PTHRESH=31 */
395#define E1000_TXDCTL_COUNT_DESC 0x00400000 /* Enable the counting of desc. 399/* Enable the counting of desc. still to be processed. */
396 still to be processed. */ 400#define E1000_TXDCTL_COUNT_DESC 0x00400000
397 401
398/* Flow Control Constants */ 402/* Flow Control Constants */
399#define FLOW_CONTROL_ADDRESS_LOW 0x00C28001 403#define FLOW_CONTROL_ADDRESS_LOW 0x00C28001
@@ -404,7 +408,8 @@
404#define E1000_VLAN_FILTER_TBL_SIZE 128 /* VLAN Filter Table (4096 bits) */ 408#define E1000_VLAN_FILTER_TBL_SIZE 128 /* VLAN Filter Table (4096 bits) */
405 409
406/* Receive Address */ 410/* Receive Address */
407/* Number of high/low register pairs in the RAR. The RAR (Receive Address 411/*
412 * Number of high/low register pairs in the RAR. The RAR (Receive Address
408 * Registers) holds the directed and multicast addresses that we monitor. 413 * Registers) holds the directed and multicast addresses that we monitor.
409 * Technically, we have 16 spots. However, we reserve one of these spots 414 * Technically, we have 16 spots. However, we reserve one of these spots
410 * (RAR[15]) for our directed address used by controllers with 415 * (RAR[15]) for our directed address used by controllers with
@@ -533,8 +538,8 @@
533#define E1000_EECD_REQ 0x00000040 /* NVM Access Request */ 538#define E1000_EECD_REQ 0x00000040 /* NVM Access Request */
534#define E1000_EECD_GNT 0x00000080 /* NVM Access Grant */ 539#define E1000_EECD_GNT 0x00000080 /* NVM Access Grant */
535#define E1000_EECD_SIZE 0x00000200 /* NVM Size (0=64 word 1=256 word) */ 540#define E1000_EECD_SIZE 0x00000200 /* NVM Size (0=64 word 1=256 word) */
536#define E1000_EECD_ADDR_BITS 0x00000400 /* NVM Addressing bits based on type 541/* NVM Addressing bits based on type (0-small, 1-large) */
537 * (0-small, 1-large) */ 542#define E1000_EECD_ADDR_BITS 0x00000400
538#define E1000_NVM_GRANT_ATTEMPTS 1000 /* NVM # attempts to gain grant */ 543#define E1000_NVM_GRANT_ATTEMPTS 1000 /* NVM # attempts to gain grant */
539#define E1000_EECD_AUTO_RD 0x00000200 /* NVM Auto Read done */ 544#define E1000_EECD_AUTO_RD 0x00000200 /* NVM Auto Read done */
540#define E1000_EECD_SIZE_EX_MASK 0x00007800 /* NVM Size */ 545#define E1000_EECD_SIZE_EX_MASK 0x00007800 /* NVM Size */
@@ -626,7 +631,8 @@
626#define MAX_PHY_MULTI_PAGE_REG 0xF 631#define MAX_PHY_MULTI_PAGE_REG 0xF
627 632
628/* Bit definitions for valid PHY IDs. */ 633/* Bit definitions for valid PHY IDs. */
629/* I = Integrated 634/*
635 * I = Integrated
630 * E = External 636 * E = External
631 */ 637 */
632#define M88E1000_E_PHY_ID 0x01410C50 638#define M88E1000_E_PHY_ID 0x01410C50
@@ -653,37 +659,37 @@
653#define M88E1000_PSCR_MDI_MANUAL_MODE 0x0000 /* MDI Crossover Mode bits 6:5 */ 659#define M88E1000_PSCR_MDI_MANUAL_MODE 0x0000 /* MDI Crossover Mode bits 6:5 */
654 /* Manual MDI configuration */ 660 /* Manual MDI configuration */
655#define M88E1000_PSCR_MDIX_MANUAL_MODE 0x0020 /* Manual MDIX configuration */ 661#define M88E1000_PSCR_MDIX_MANUAL_MODE 0x0020 /* Manual MDIX configuration */
656#define M88E1000_PSCR_AUTO_X_1000T 0x0040 /* 1000BASE-T: Auto crossover, 662/* 1000BASE-T: Auto crossover, 100BASE-TX/10BASE-T: MDI Mode */
657 * 100BASE-TX/10BASE-T: 663#define M88E1000_PSCR_AUTO_X_1000T 0x0040
658 * MDI Mode 664/* Auto crossover enabled all speeds */
659 */ 665#define M88E1000_PSCR_AUTO_X_MODE 0x0060
660#define M88E1000_PSCR_AUTO_X_MODE 0x0060 /* Auto crossover enabled 666/*
661 * all speeds. 667 * 1=Enable Extended 10BASE-T distance (Lower 10BASE-T Rx Threshold)
662 */ 668 * 0=Normal 10BASE-T Rx Threshold
663 /* 1=Enable Extended 10BASE-T distance 669 */
664 * (Lower 10BASE-T RX Threshold) 670#define M88E1000_PSCR_ASSERT_CRS_ON_TX 0x0800 /* 1=Assert CRS on Transmit */
665 * 0=Normal 10BASE-T RX Threshold */
666 /* 1=5-Bit interface in 100BASE-TX
667 * 0=MII interface in 100BASE-TX */
668#define M88E1000_PSCR_ASSERT_CRS_ON_TX 0x0800 /* 1=Assert CRS on Transmit */
669 671
670/* M88E1000 PHY Specific Status Register */ 672/* M88E1000 PHY Specific Status Register */
671#define M88E1000_PSSR_REV_POLARITY 0x0002 /* 1=Polarity reversed */ 673#define M88E1000_PSSR_REV_POLARITY 0x0002 /* 1=Polarity reversed */
672#define M88E1000_PSSR_DOWNSHIFT 0x0020 /* 1=Downshifted */ 674#define M88E1000_PSSR_DOWNSHIFT 0x0020 /* 1=Downshifted */
673#define M88E1000_PSSR_MDIX 0x0040 /* 1=MDIX; 0=MDI */ 675#define M88E1000_PSSR_MDIX 0x0040 /* 1=MDIX; 0=MDI */
674#define M88E1000_PSSR_CABLE_LENGTH 0x0380 /* 0=<50M;1=50-80M;2=80-110M; 676/* 0=<50M; 1=50-80M; 2=80-110M; 3=110-140M; 4=>140M */
675 * 3=110-140M;4=>140M */ 677#define M88E1000_PSSR_CABLE_LENGTH 0x0380
676#define M88E1000_PSSR_SPEED 0xC000 /* Speed, bits 14:15 */ 678#define M88E1000_PSSR_SPEED 0xC000 /* Speed, bits 14:15 */
677#define M88E1000_PSSR_1000MBS 0x8000 /* 10=1000Mbs */ 679#define M88E1000_PSSR_1000MBS 0x8000 /* 10=1000Mbs */
678 680
679#define M88E1000_PSSR_CABLE_LENGTH_SHIFT 7 681#define M88E1000_PSSR_CABLE_LENGTH_SHIFT 7
680 682
681/* Number of times we will attempt to autonegotiate before downshifting if we 683/*
682 * are the master */ 684 * Number of times we will attempt to autonegotiate before downshifting if we
685 * are the master
686 */
683#define M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK 0x0C00 687#define M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK 0x0C00
684#define M88E1000_EPSCR_MASTER_DOWNSHIFT_1X 0x0000 688#define M88E1000_EPSCR_MASTER_DOWNSHIFT_1X 0x0000
685/* Number of times we will attempt to autonegotiate before downshifting if we 689/*
686 * are the slave */ 690 * Number of times we will attempt to autonegotiate before downshifting if we
691 * are the slave
692 */
687#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK 0x0300 693#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK 0x0300
688#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X 0x0100 694#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X 0x0100
689#define M88E1000_EPSCR_TX_CLK_25 0x0070 /* 25 MHz TX_CLK */ 695#define M88E1000_EPSCR_TX_CLK_25 0x0070 /* 25 MHz TX_CLK */
@@ -692,7 +698,8 @@
692#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK 0x0E00 698#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK 0x0E00
693#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X 0x0800 699#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X 0x0800
694 700
695/* Bits... 701/*
702 * Bits...
696 * 15-5: page 703 * 15-5: page
697 * 4-0: register offset 704 * 4-0: register offset
698 */ 705 */