aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_hw.h
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2006-03-02 21:21:10 -0500
committerroot <root@jk-desktop.jf.intel.com>2006-03-02 21:21:10 -0500
commit6418ecc68e1d9416451b6f78ebb2c0b077e0abf2 (patch)
tree4fa4a491d559b388e7461192455bd0ebbca5d2b5 /drivers/net/e1000/e1000_hw.h
parent2a1af5d7dfd809b16fb69f3f0fc073d9b6b7c6ac (diff)
e1000: Add support for new hardware (ESB2)
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
Diffstat (limited to 'drivers/net/e1000/e1000_hw.h')
-rw-r--r--drivers/net/e1000/e1000_hw.h287
1 files changed, 287 insertions, 0 deletions
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index f565b201c49e..947a156bd702 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -60,6 +60,7 @@ typedef enum {
60 e1000_82571, 60 e1000_82571,
61 e1000_82572, 61 e1000_82572,
62 e1000_82573, 62 e1000_82573,
63 e1000_80003es2lan,
63 e1000_num_macs 64 e1000_num_macs
64} e1000_mac_type; 65} e1000_mac_type;
65 66
@@ -139,6 +140,13 @@ typedef enum {
139} e1000_cable_length; 140} e1000_cable_length;
140 141
141typedef enum { 142typedef enum {
143 e1000_gg_cable_length_60 = 0,
144 e1000_gg_cable_length_60_115 = 1,
145 e1000_gg_cable_length_115_150 = 2,
146 e1000_gg_cable_length_150 = 4
147} e1000_gg_cable_length;
148
149typedef enum {
142 e1000_igp_cable_length_10 = 10, 150 e1000_igp_cable_length_10 = 10,
143 e1000_igp_cable_length_20 = 20, 151 e1000_igp_cable_length_20 = 20,
144 e1000_igp_cable_length_30 = 30, 152 e1000_igp_cable_length_30 = 30,
@@ -208,6 +216,7 @@ typedef enum {
208 e1000_phy_m88 = 0, 216 e1000_phy_m88 = 0,
209 e1000_phy_igp, 217 e1000_phy_igp,
210 e1000_phy_igp_2, 218 e1000_phy_igp_2,
219 e1000_phy_gg82563,
211 e1000_phy_undefined = 0xFF 220 e1000_phy_undefined = 0xFF
212} e1000_phy_type; 221} e1000_phy_type;
213 222
@@ -281,6 +290,7 @@ typedef enum {
281#define E1000_ERR_MASTER_REQUESTS_PENDING 10 290#define E1000_ERR_MASTER_REQUESTS_PENDING 10
282#define E1000_ERR_HOST_INTERFACE_COMMAND 11 291#define E1000_ERR_HOST_INTERFACE_COMMAND 11
283#define E1000_BLK_PHY_RESET 12 292#define E1000_BLK_PHY_RESET 12
293#define E1000_ERR_SWFW_SYNC 13
284 294
285/* Function prototypes */ 295/* Function prototypes */
286/* Initialization */ 296/* Initialization */
@@ -304,6 +314,8 @@ int32_t e1000_phy_hw_reset(struct e1000_hw *hw);
304int32_t e1000_phy_reset(struct e1000_hw *hw); 314int32_t e1000_phy_reset(struct e1000_hw *hw);
305int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); 315int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info);
306int32_t e1000_validate_mdi_setting(struct e1000_hw *hw); 316int32_t e1000_validate_mdi_setting(struct e1000_hw *hw);
317int32_t e1000_read_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *data);
318int32_t e1000_write_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data);
307 319
308/* EEPROM Functions */ 320/* EEPROM Functions */
309int32_t e1000_init_eeprom_params(struct e1000_hw *hw); 321int32_t e1000_init_eeprom_params(struct e1000_hw *hw);
@@ -454,6 +466,8 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw);
454#define E1000_DEV_ID_82573E_IAMT 0x108C 466#define E1000_DEV_ID_82573E_IAMT 0x108C
455#define E1000_DEV_ID_82573L 0x109A 467#define E1000_DEV_ID_82573L 0x109A
456#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 468#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5
469#define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096
470#define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098
457 471
458 472
459#define NODE_ADDRESS_SIZE 6 473#define NODE_ADDRESS_SIZE 6
@@ -850,6 +864,7 @@ struct e1000_ffvt_entry {
850#define E1000_TXCW 0x00178 /* TX Configuration Word - RW */ 864#define E1000_TXCW 0x00178 /* TX Configuration Word - RW */
851#define E1000_RXCW 0x00180 /* RX Configuration Word - RO */ 865#define E1000_RXCW 0x00180 /* RX Configuration Word - RO */
852#define E1000_TCTL 0x00400 /* TX Control - RW */ 866#define E1000_TCTL 0x00400 /* TX Control - RW */
867#define E1000_TCTL_EXT 0x00404 /* Extended TX Control - RW */
853#define E1000_TIPG 0x00410 /* TX Inter-packet gap -RW */ 868#define E1000_TIPG 0x00410 /* TX Inter-packet gap -RW */
854#define E1000_TBT 0x00448 /* TX Burst Timer - RW */ 869#define E1000_TBT 0x00448 /* TX Burst Timer - RW */
855#define E1000_AIT 0x00458 /* Adaptive Interframe Spacing Throttle - RW */ 870#define E1000_AIT 0x00458 /* Adaptive Interframe Spacing Throttle - RW */
@@ -996,6 +1011,11 @@ struct e1000_ffvt_entry {
996#define E1000_FFMT 0x09000 /* Flexible Filter Mask Table - RW Array */ 1011#define E1000_FFMT 0x09000 /* Flexible Filter Mask Table - RW Array */
997#define E1000_FFVT 0x09800 /* Flexible Filter Value Table - RW Array */ 1012#define E1000_FFVT 0x09800 /* Flexible Filter Value Table - RW Array */
998 1013
1014#define E1000_KUMCTRLSTA 0x00034 /* MAC-PHY interface - RW */
1015#define E1000_MDPHYA 0x0003C /* PHY address - RW */
1016#define E1000_MANC2H 0x05860 /* Managment Control To Host - RW */
1017#define E1000_SW_FW_SYNC 0x05B5C /* Software-Firmware Synchronization - RW */
1018
999#define E1000_GCR 0x05B00 /* PCI-Ex Control */ 1019#define E1000_GCR 0x05B00 /* PCI-Ex Control */
1000#define E1000_GSCL_1 0x05B10 /* PCI-Ex Statistic Control #1 */ 1020#define E1000_GSCL_1 0x05B10 /* PCI-Ex Statistic Control #1 */
1001#define E1000_GSCL_2 0x05B14 /* PCI-Ex Statistic Control #2 */ 1021#define E1000_GSCL_2 0x05B14 /* PCI-Ex Statistic Control #2 */
@@ -1065,6 +1085,7 @@ struct e1000_ffvt_entry {
1065#define E1000_82542_RXCW E1000_RXCW 1085#define E1000_82542_RXCW E1000_RXCW
1066#define E1000_82542_MTA 0x00200 1086#define E1000_82542_MTA 0x00200
1067#define E1000_82542_TCTL E1000_TCTL 1087#define E1000_82542_TCTL E1000_TCTL
1088#define E1000_82542_TCTL_EXT E1000_TCTL_EXT
1068#define E1000_82542_TIPG E1000_TIPG 1089#define E1000_82542_TIPG E1000_TIPG
1069#define E1000_82542_TDBAL 0x00420 1090#define E1000_82542_TDBAL 0x00420
1070#define E1000_82542_TDBAH 0x00424 1091#define E1000_82542_TDBAH 0x00424
@@ -1212,6 +1233,8 @@ struct e1000_ffvt_entry {
1212#define E1000_82542_RSSRK E1000_RSSRK 1233#define E1000_82542_RSSRK E1000_RSSRK
1213#define E1000_82542_RSSIM E1000_RSSIM 1234#define E1000_82542_RSSIM E1000_RSSIM
1214#define E1000_82542_RSSIR E1000_RSSIR 1235#define E1000_82542_RSSIR E1000_RSSIR
1236#define E1000_82542_KUMCTRLSTA E1000_KUMCTRLSTA
1237#define E1000_82542_SW_FW_SYNC E1000_SW_FW_SYNC
1215 1238
1216/* Statistics counters collected by the MAC */ 1239/* Statistics counters collected by the MAC */
1217struct e1000_hw_stats { 1240struct e1000_hw_stats {
@@ -1303,6 +1326,7 @@ struct e1000_hw {
1303 e1000_ffe_config ffe_config_state; 1326 e1000_ffe_config ffe_config_state;
1304 uint32_t asf_firmware_present; 1327 uint32_t asf_firmware_present;
1305 uint32_t eeprom_semaphore_present; 1328 uint32_t eeprom_semaphore_present;
1329 uint32_t swfw_sync_present;
1306 unsigned long io_base; 1330 unsigned long io_base;
1307 uint32_t phy_id; 1331 uint32_t phy_id;
1308 uint32_t phy_revision; 1332 uint32_t phy_revision;
@@ -1394,6 +1418,8 @@ struct e1000_hw {
1394#define E1000_CTRL_FRCDPX 0x00001000 /* Force Duplex */ 1418#define E1000_CTRL_FRCDPX 0x00001000 /* Force Duplex */
1395#define E1000_CTRL_D_UD_EN 0x00002000 /* Dock/Undock enable */ 1419#define E1000_CTRL_D_UD_EN 0x00002000 /* Dock/Undock enable */
1396#define E1000_CTRL_D_UD_POLARITY 0x00004000 /* Defined polarity of Dock/Undock indication in SDP[0] */ 1420#define E1000_CTRL_D_UD_POLARITY 0x00004000 /* Defined polarity of Dock/Undock indication in SDP[0] */
1421#define E1000_CTRL_FORCE_PHY_RESET 0x00008000 /* Reset both PHY ports, through PHYRST_N pin */
1422#define E1000_CTRL_EXT_LINK_EN 0x00010000 /* enable link status from external LINK_0 and LINK_1 pins */
1397#define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */ 1423#define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */
1398#define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */ 1424#define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */
1399#define E1000_CTRL_SWDPIN2 0x00100000 /* SWDPIN 2 value */ 1425#define E1000_CTRL_SWDPIN2 0x00100000 /* SWDPIN 2 value */
@@ -1430,6 +1456,16 @@ struct e1000_hw {
1430#define E1000_STATUS_BUS64 0x00001000 /* In 64 bit slot */ 1456#define E1000_STATUS_BUS64 0x00001000 /* In 64 bit slot */
1431#define E1000_STATUS_PCIX_MODE 0x00002000 /* PCI-X mode */ 1457#define E1000_STATUS_PCIX_MODE 0x00002000 /* PCI-X mode */
1432#define E1000_STATUS_PCIX_SPEED 0x0000C000 /* PCI-X bus speed */ 1458#define E1000_STATUS_PCIX_SPEED 0x0000C000 /* PCI-X bus speed */
1459#define E1000_STATUS_BMC_SKU_0 0x00100000 /* BMC USB redirect disabled */
1460#define E1000_STATUS_BMC_SKU_1 0x00200000 /* BMC SRAM disabled */
1461#define E1000_STATUS_BMC_SKU_2 0x00400000 /* BMC SDRAM disabled */
1462#define E1000_STATUS_BMC_CRYPTO 0x00800000 /* BMC crypto disabled */
1463#define E1000_STATUS_BMC_LITE 0x01000000 /* BMC external code execution disabled */
1464#define E1000_STATUS_RGMII_ENABLE 0x02000000 /* RGMII disabled */
1465#define E1000_STATUS_FUSE_8 0x04000000
1466#define E1000_STATUS_FUSE_9 0x08000000
1467#define E1000_STATUS_SERDES0_DIS 0x10000000 /* SERDES disabled on port 0 */
1468#define E1000_STATUS_SERDES1_DIS 0x20000000 /* SERDES disabled on port 1 */
1433 1469
1434/* Constants used to intrepret the masked PCI-X bus speed. */ 1470/* Constants used to intrepret the masked PCI-X bus speed. */
1435#define E1000_STATUS_PCIX_SPEED_66 0x00000000 /* PCI-X bus speed 50-66 MHz */ 1471#define E1000_STATUS_PCIX_SPEED_66 0x00000000 /* PCI-X bus speed 50-66 MHz */
@@ -1507,6 +1543,8 @@ struct e1000_hw {
1507#define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000 1543#define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000
1508#define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000 1544#define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000
1509#define E1000_CTRL_EXT_LINK_MODE_TBI 0x00C00000 1545#define E1000_CTRL_EXT_LINK_MODE_TBI 0x00C00000
1546#define E1000_CTRL_EXT_LINK_MODE_KMRN 0x00000000
1547#define E1000_CTRL_EXT_LINK_MODE_SERDES 0x00C00000
1510#define E1000_CTRL_EXT_WR_WMARK_MASK 0x03000000 1548#define E1000_CTRL_EXT_WR_WMARK_MASK 0x03000000
1511#define E1000_CTRL_EXT_WR_WMARK_256 0x00000000 1549#define E1000_CTRL_EXT_WR_WMARK_256 0x00000000
1512#define E1000_CTRL_EXT_WR_WMARK_320 0x01000000 1550#define E1000_CTRL_EXT_WR_WMARK_320 0x01000000
@@ -1516,6 +1554,9 @@ struct e1000_hw {
1516#define E1000_CTRL_EXT_DRV_LOAD 0x10000000 /* Driver loaded bit for FW */ 1554#define E1000_CTRL_EXT_DRV_LOAD 0x10000000 /* Driver loaded bit for FW */
1517#define E1000_CTRL_EXT_IAME 0x08000000 /* Interrupt acknowledge Auto-mask */ 1555#define E1000_CTRL_EXT_IAME 0x08000000 /* Interrupt acknowledge Auto-mask */
1518#define E1000_CTRL_EXT_INT_TIMER_CLR 0x20000000 /* Clear Interrupt timers after IMS clear */ 1556#define E1000_CTRL_EXT_INT_TIMER_CLR 0x20000000 /* Clear Interrupt timers after IMS clear */
1557#define E1000_CRTL_EXT_PB_PAREN 0x01000000 /* packet buffer parity error detection enabled */
1558#define E1000_CTRL_EXT_DF_PAREN 0x02000000 /* descriptor FIFO parity error detection enable */
1559#define E1000_CTRL_EXT_GHOST_PAREN 0x40000000
1519 1560
1520/* MDI Control */ 1561/* MDI Control */
1521#define E1000_MDIC_DATA_MASK 0x0000FFFF 1562#define E1000_MDIC_DATA_MASK 0x0000FFFF
@@ -1529,6 +1570,32 @@ struct e1000_hw {
1529#define E1000_MDIC_INT_EN 0x20000000 1570#define E1000_MDIC_INT_EN 0x20000000
1530#define E1000_MDIC_ERROR 0x40000000 1571#define E1000_MDIC_ERROR 0x40000000
1531 1572
1573#define E1000_KUMCTRLSTA_MASK 0x0000FFFF
1574#define E1000_KUMCTRLSTA_OFFSET 0x001F0000
1575#define E1000_KUMCTRLSTA_OFFSET_SHIFT 16
1576#define E1000_KUMCTRLSTA_REN 0x00200000
1577
1578#define E1000_KUMCTRLSTA_OFFSET_FIFO_CTRL 0x00000000
1579#define E1000_KUMCTRLSTA_OFFSET_CTRL 0x00000001
1580#define E1000_KUMCTRLSTA_OFFSET_INB_CTRL 0x00000002
1581#define E1000_KUMCTRLSTA_OFFSET_DIAG 0x00000003
1582#define E1000_KUMCTRLSTA_OFFSET_TIMEOUTS 0x00000004
1583#define E1000_KUMCTRLSTA_OFFSET_INB_PARAM 0x00000009
1584#define E1000_KUMCTRLSTA_OFFSET_HD_CTRL 0x00000010
1585#define E1000_KUMCTRLSTA_OFFSET_M2P_SERDES 0x0000001E
1586#define E1000_KUMCTRLSTA_OFFSET_M2P_MODES 0x0000001F
1587
1588/* FIFO Control */
1589#define E1000_KUMCTRLSTA_FIFO_CTRL_RX_BYPASS 0x00000008
1590#define E1000_KUMCTRLSTA_FIFO_CTRL_TX_BYPASS 0x00000800
1591
1592/* In-Band Control */
1593#define E1000_KUMCTRLSTA_INB_CTRL_DIS_PADDING 0x00000010
1594
1595/* Half-Duplex Control */
1596#define E1000_KUMCTRLSTA_HD_CTRL_10_100_DEFAULT 0x00000004
1597#define E1000_KUMCTRLSTA_HD_CTRL_1000_DEFAULT 0x00000000
1598
1532/* LED Control */ 1599/* LED Control */
1533#define E1000_LEDCTL_LED0_MODE_MASK 0x0000000F 1600#define E1000_LEDCTL_LED0_MODE_MASK 0x0000000F
1534#define E1000_LEDCTL_LED0_MODE_SHIFT 0 1601#define E1000_LEDCTL_LED0_MODE_SHIFT 0
@@ -1591,6 +1658,13 @@ struct e1000_hw {
1591#define E1000_ICR_MNG 0x00040000 /* Manageability event */ 1658#define E1000_ICR_MNG 0x00040000 /* Manageability event */
1592#define E1000_ICR_DOCK 0x00080000 /* Dock/Undock */ 1659#define E1000_ICR_DOCK 0x00080000 /* Dock/Undock */
1593#define E1000_ICR_INT_ASSERTED 0x80000000 /* If this bit asserted, the driver should claim the interrupt */ 1660#define E1000_ICR_INT_ASSERTED 0x80000000 /* If this bit asserted, the driver should claim the interrupt */
1661#define E1000_ICR_RXD_FIFO_PAR0 0x00100000 /* queue 0 Rx descriptor FIFO parity error */
1662#define E1000_ICR_TXD_FIFO_PAR0 0x00200000 /* queue 0 Tx descriptor FIFO parity error */
1663#define E1000_ICR_HOST_ARB_PAR 0x00400000 /* host arb read buffer parity error */
1664#define E1000_ICR_PB_PAR 0x00800000 /* packet buffer parity error */
1665#define E1000_ICR_RXD_FIFO_PAR1 0x01000000 /* queue 1 Rx descriptor FIFO parity error */
1666#define E1000_ICR_TXD_FIFO_PAR1 0x02000000 /* queue 1 Tx descriptor FIFO parity error */
1667#define E1000_ICR_ALL_PARITY 0x03F00000 /* all parity error bits */
1594 1668
1595/* Interrupt Cause Set */ 1669/* Interrupt Cause Set */
1596#define E1000_ICS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ 1670#define E1000_ICS_TXDW E1000_ICR_TXDW /* Transmit desc written back */
@@ -1611,6 +1685,12 @@ struct e1000_hw {
1611#define E1000_ICS_ACK E1000_ICR_ACK /* Receive Ack frame */ 1685#define E1000_ICS_ACK E1000_ICR_ACK /* Receive Ack frame */
1612#define E1000_ICS_MNG E1000_ICR_MNG /* Manageability event */ 1686#define E1000_ICS_MNG E1000_ICR_MNG /* Manageability event */
1613#define E1000_ICS_DOCK E1000_ICR_DOCK /* Dock/Undock */ 1687#define E1000_ICS_DOCK E1000_ICR_DOCK /* Dock/Undock */
1688#define E1000_ICS_RXD_FIFO_PAR0 E1000_ICR_RXD_FIFO_PAR0 /* queue 0 Rx descriptor FIFO parity error */
1689#define E1000_ICS_TXD_FIFO_PAR0 E1000_ICR_TXD_FIFO_PAR0 /* queue 0 Tx descriptor FIFO parity error */
1690#define E1000_ICS_HOST_ARB_PAR E1000_ICR_HOST_ARB_PAR /* host arb read buffer parity error */
1691#define E1000_ICS_PB_PAR E1000_ICR_PB_PAR /* packet buffer parity error */
1692#define E1000_ICS_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1 /* queue 1 Rx descriptor FIFO parity error */
1693#define E1000_ICS_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1 /* queue 1 Tx descriptor FIFO parity error */
1614 1694
1615/* Interrupt Mask Set */ 1695/* Interrupt Mask Set */
1616#define E1000_IMS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ 1696#define E1000_IMS_TXDW E1000_ICR_TXDW /* Transmit desc written back */
@@ -1631,6 +1711,12 @@ struct e1000_hw {
1631#define E1000_IMS_ACK E1000_ICR_ACK /* Receive Ack frame */ 1711#define E1000_IMS_ACK E1000_ICR_ACK /* Receive Ack frame */
1632#define E1000_IMS_MNG E1000_ICR_MNG /* Manageability event */ 1712#define E1000_IMS_MNG E1000_ICR_MNG /* Manageability event */
1633#define E1000_IMS_DOCK E1000_ICR_DOCK /* Dock/Undock */ 1713#define E1000_IMS_DOCK E1000_ICR_DOCK /* Dock/Undock */
1714#define E1000_IMS_RXD_FIFO_PAR0 E1000_ICR_RXD_FIFO_PAR0 /* queue 0 Rx descriptor FIFO parity error */
1715#define E1000_IMS_TXD_FIFO_PAR0 E1000_ICR_TXD_FIFO_PAR0 /* queue 0 Tx descriptor FIFO parity error */
1716#define E1000_IMS_HOST_ARB_PAR E1000_ICR_HOST_ARB_PAR /* host arb read buffer parity error */
1717#define E1000_IMS_PB_PAR E1000_ICR_PB_PAR /* packet buffer parity error */
1718#define E1000_IMS_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1 /* queue 1 Rx descriptor FIFO parity error */
1719#define E1000_IMS_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1 /* queue 1 Tx descriptor FIFO parity error */
1634 1720
1635/* Interrupt Mask Clear */ 1721/* Interrupt Mask Clear */
1636#define E1000_IMC_TXDW E1000_ICR_TXDW /* Transmit desc written back */ 1722#define E1000_IMC_TXDW E1000_ICR_TXDW /* Transmit desc written back */
@@ -1651,6 +1737,12 @@ struct e1000_hw {
1651#define E1000_IMC_ACK E1000_ICR_ACK /* Receive Ack frame */ 1737#define E1000_IMC_ACK E1000_ICR_ACK /* Receive Ack frame */
1652#define E1000_IMC_MNG E1000_ICR_MNG /* Manageability event */ 1738#define E1000_IMC_MNG E1000_ICR_MNG /* Manageability event */
1653#define E1000_IMC_DOCK E1000_ICR_DOCK /* Dock/Undock */ 1739#define E1000_IMC_DOCK E1000_ICR_DOCK /* Dock/Undock */
1740#define E1000_IMC_RXD_FIFO_PAR0 E1000_ICR_RXD_FIFO_PAR0 /* queue 0 Rx descriptor FIFO parity error */
1741#define E1000_IMC_TXD_FIFO_PAR0 E1000_ICR_TXD_FIFO_PAR0 /* queue 0 Tx descriptor FIFO parity error */
1742#define E1000_IMC_HOST_ARB_PAR E1000_ICR_HOST_ARB_PAR /* host arb read buffer parity error */
1743#define E1000_IMC_PB_PAR E1000_ICR_PB_PAR /* packet buffer parity error */
1744#define E1000_IMC_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1 /* queue 1 Rx descriptor FIFO parity error */
1745#define E1000_IMC_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1 /* queue 1 Tx descriptor FIFO parity error */
1654 1746
1655/* Receive Control */ 1747/* Receive Control */
1656#define E1000_RCTL_RST 0x00000001 /* Software reset */ 1748#define E1000_RCTL_RST 0x00000001 /* Software reset */
@@ -1720,6 +1812,12 @@ struct e1000_hw {
1720#define E1000_PSRCTL_BSIZE2_SHIFT 6 /* Shift _left_ 6 */ 1812#define E1000_PSRCTL_BSIZE2_SHIFT 6 /* Shift _left_ 6 */
1721#define E1000_PSRCTL_BSIZE3_SHIFT 14 /* Shift _left_ 14 */ 1813#define E1000_PSRCTL_BSIZE3_SHIFT 14 /* Shift _left_ 14 */
1722 1814
1815/* SW_W_SYNC definitions */
1816#define E1000_SWFW_EEP_SM 0x0001
1817#define E1000_SWFW_PHY0_SM 0x0002
1818#define E1000_SWFW_PHY1_SM 0x0004
1819#define E1000_SWFW_MAC_CSR_SM 0x0008
1820
1723/* Receive Descriptor */ 1821/* Receive Descriptor */
1724#define E1000_RDT_DELAY 0x0000ffff /* Delay timer (1=1024us) */ 1822#define E1000_RDT_DELAY 0x0000ffff /* Delay timer (1=1024us) */
1725#define E1000_RDT_FPDB 0x80000000 /* Flush descriptor block */ 1823#define E1000_RDT_FPDB 0x80000000 /* Flush descriptor block */
@@ -1798,6 +1896,11 @@ struct e1000_hw {
1798#define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */ 1896#define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */
1799#define E1000_TCTL_NRTU 0x02000000 /* No Re-transmit on underrun */ 1897#define E1000_TCTL_NRTU 0x02000000 /* No Re-transmit on underrun */
1800#define E1000_TCTL_MULR 0x10000000 /* Multiple request support */ 1898#define E1000_TCTL_MULR 0x10000000 /* Multiple request support */
1899/* Extended Transmit Control */
1900#define E1000_TCTL_EXT_BST_MASK 0x000003FF /* Backoff Slot Time */
1901#define E1000_TCTL_EXT_GCEX_MASK 0x000FFC00 /* Gigabit Carry Extend Padding */
1902
1903#define DEFAULT_80003ES2LAN_TCTL_EXT_GCEX 0x00010000
1801 1904
1802/* Receive Checksum Control */ 1905/* Receive Checksum Control */
1803#define E1000_RXCSUM_PCSS_MASK 0x000000FF /* Packet Checksum Start */ 1906#define E1000_RXCSUM_PCSS_MASK 0x000000FF /* Packet Checksum Start */
@@ -2044,6 +2147,7 @@ struct e1000_host_command_info {
2044#define EEPROM_CHECKSUM_REG 0x003F 2147#define EEPROM_CHECKSUM_REG 0x003F
2045 2148
2046#define E1000_EEPROM_CFG_DONE 0x00040000 /* MNG config cycle done */ 2149#define E1000_EEPROM_CFG_DONE 0x00040000 /* MNG config cycle done */
2150#define E1000_EEPROM_CFG_DONE_PORT_1 0x00080000 /* ...for second port */
2047 2151
2048/* Word definitions for ID LED Settings */ 2152/* Word definitions for ID LED Settings */
2049#define ID_LED_RESERVED_0000 0x0000 2153#define ID_LED_RESERVED_0000 0x0000
@@ -2132,8 +2236,11 @@ struct e1000_host_command_info {
2132 2236
2133#define DEFAULT_82542_TIPG_IPGR2 10 2237#define DEFAULT_82542_TIPG_IPGR2 10
2134#define DEFAULT_82543_TIPG_IPGR2 6 2238#define DEFAULT_82543_TIPG_IPGR2 6
2239#define DEFAULT_80003ES2LAN_TIPG_IPGR2 7
2135#define E1000_TIPG_IPGR2_SHIFT 20 2240#define E1000_TIPG_IPGR2_SHIFT 20
2136 2241
2242#define DEFAULT_80003ES2LAN_TIPG_IPGT_10_100 0x00000009
2243#define DEFAULT_80003ES2LAN_TIPG_IPGT_1000 0x00000008
2137#define E1000_TXDMAC_DPP 0x00000001 2244#define E1000_TXDMAC_DPP 0x00000001
2138 2245
2139/* Adaptive IFS defines */ 2246/* Adaptive IFS defines */
@@ -2374,6 +2481,78 @@ struct e1000_host_command_info {
2374 2481
2375#define IGP01E1000_ANALOG_REGS_PAGE 0x20C0 2482#define IGP01E1000_ANALOG_REGS_PAGE 0x20C0
2376 2483
2484/* Bits...
2485 * 15-5: page
2486 * 4-0: register offset
2487 */
2488#define GG82563_PAGE_SHIFT 5
2489#define GG82563_REG(page, reg) \
2490 (((page) << GG82563_PAGE_SHIFT) | ((reg) & MAX_PHY_REG_ADDRESS))
2491#define GG82563_MIN_ALT_REG 30
2492
2493/* GG82563 Specific Registers */
2494#define GG82563_PHY_SPEC_CTRL \
2495 GG82563_REG(0, 16) /* PHY Specific Control */
2496#define GG82563_PHY_SPEC_STATUS \
2497 GG82563_REG(0, 17) /* PHY Specific Status */
2498#define GG82563_PHY_INT_ENABLE \
2499 GG82563_REG(0, 18) /* Interrupt Enable */
2500#define GG82563_PHY_SPEC_STATUS_2 \
2501 GG82563_REG(0, 19) /* PHY Specific Status 2 */
2502#define GG82563_PHY_RX_ERR_CNTR \
2503 GG82563_REG(0, 21) /* Receive Error Counter */
2504#define GG82563_PHY_PAGE_SELECT \
2505 GG82563_REG(0, 22) /* Page Select */
2506#define GG82563_PHY_SPEC_CTRL_2 \
2507 GG82563_REG(0, 26) /* PHY Specific Control 2 */
2508#define GG82563_PHY_PAGE_SELECT_ALT \
2509 GG82563_REG(0, 29) /* Alternate Page Select */
2510#define GG82563_PHY_TEST_CLK_CTRL \
2511 GG82563_REG(0, 30) /* Test Clock Control (use reg. 29 to select) */
2512
2513#define GG82563_PHY_MAC_SPEC_CTRL \
2514 GG82563_REG(2, 21) /* MAC Specific Control Register */
2515#define GG82563_PHY_MAC_SPEC_CTRL_2 \
2516 GG82563_REG(2, 26) /* MAC Specific Control 2 */
2517
2518#define GG82563_PHY_DSP_DISTANCE \
2519 GG82563_REG(5, 26) /* DSP Distance */
2520
2521/* Page 193 - Port Control Registers */
2522#define GG82563_PHY_KMRN_MODE_CTRL \
2523 GG82563_REG(193, 16) /* Kumeran Mode Control */
2524#define GG82563_PHY_PORT_RESET \
2525 GG82563_REG(193, 17) /* Port Reset */
2526#define GG82563_PHY_REVISION_ID \
2527 GG82563_REG(193, 18) /* Revision ID */
2528#define GG82563_PHY_DEVICE_ID \
2529 GG82563_REG(193, 19) /* Device ID */
2530#define GG82563_PHY_PWR_MGMT_CTRL \
2531 GG82563_REG(193, 20) /* Power Management Control */
2532#define GG82563_PHY_RATE_ADAPT_CTRL \
2533 GG82563_REG(193, 25) /* Rate Adaptation Control */
2534
2535/* Page 194 - KMRN Registers */
2536#define GG82563_PHY_KMRN_FIFO_CTRL_STAT \
2537 GG82563_REG(194, 16) /* FIFO's Control/Status */
2538#define GG82563_PHY_KMRN_CTRL \
2539 GG82563_REG(194, 17) /* Control */
2540#define GG82563_PHY_INBAND_CTRL \
2541 GG82563_REG(194, 18) /* Inband Control */
2542#define GG82563_PHY_KMRN_DIAGNOSTIC \
2543 GG82563_REG(194, 19) /* Diagnostic */
2544#define GG82563_PHY_ACK_TIMEOUTS \
2545 GG82563_REG(194, 20) /* Acknowledge Timeouts */
2546#define GG82563_PHY_ADV_ABILITY \
2547 GG82563_REG(194, 21) /* Advertised Ability */
2548#define GG82563_PHY_LINK_PARTNER_ADV_ABILITY \
2549 GG82563_REG(194, 23) /* Link Partner Advertised Ability */
2550#define GG82563_PHY_ADV_NEXT_PAGE \
2551 GG82563_REG(194, 24) /* Advertised Next Page */
2552#define GG82563_PHY_LINK_PARTNER_ADV_NEXT_PAGE \
2553 GG82563_REG(194, 25) /* Link Partner Advertised Next page */
2554#define GG82563_PHY_KMRN_MISC \
2555 GG82563_REG(194, 26) /* Misc. */
2377 2556
2378/* PHY Control Register */ 2557/* PHY Control Register */
2379#define MII_CR_SPEED_SELECT_MSB 0x0040 /* bits 6,13: 10=1000, 01=100, 00=10 */ 2558#define MII_CR_SPEED_SELECT_MSB 0x0040 /* bits 6,13: 10=1000, 01=100, 00=10 */
@@ -2687,6 +2866,113 @@ struct e1000_host_command_info {
2687#define IGP01E1000_ANALOG_FUSE_FINE_1 0x0080 2866#define IGP01E1000_ANALOG_FUSE_FINE_1 0x0080
2688#define IGP01E1000_ANALOG_FUSE_FINE_10 0x0500 2867#define IGP01E1000_ANALOG_FUSE_FINE_10 0x0500
2689 2868
2869/* GG82563 PHY Specific Status Register (Page 0, Register 16 */
2870#define GG82563_PSCR_DISABLE_JABBER 0x0001 /* 1=Disable Jabber */
2871#define GG82563_PSCR_POLARITY_REVERSAL_DISABLE 0x0002 /* 1=Polarity Reversal Disabled */
2872#define GG82563_PSCR_POWER_DOWN 0x0004 /* 1=Power Down */
2873#define GG82563_PSCR_COPPER_TRANSMITER_DISABLE 0x0008 /* 1=Transmitter Disabled */
2874#define GG82563_PSCR_CROSSOVER_MODE_MASK 0x0060
2875#define GG82563_PSCR_CROSSOVER_MODE_MDI 0x0000 /* 00=Manual MDI configuration */
2876#define GG82563_PSCR_CROSSOVER_MODE_MDIX 0x0020 /* 01=Manual MDIX configuration */
2877#define GG82563_PSCR_CROSSOVER_MODE_AUTO 0x0060 /* 11=Automatic crossover */
2878#define GG82563_PSCR_ENALBE_EXTENDED_DISTANCE 0x0080 /* 1=Enable Extended Distance */
2879#define GG82563_PSCR_ENERGY_DETECT_MASK 0x0300
2880#define GG82563_PSCR_ENERGY_DETECT_OFF 0x0000 /* 00,01=Off */
2881#define GG82563_PSCR_ENERGY_DETECT_RX 0x0200 /* 10=Sense on Rx only (Energy Detect) */
2882#define GG82563_PSCR_ENERGY_DETECT_RX_TM 0x0300 /* 11=Sense and Tx NLP */
2883#define GG82563_PSCR_FORCE_LINK_GOOD 0x0400 /* 1=Force Link Good */
2884#define GG82563_PSCR_DOWNSHIFT_ENABLE 0x0800 /* 1=Enable Downshift */
2885#define GG82563_PSCR_DOWNSHIFT_COUNTER_MASK 0x7000
2886#define GG82563_PSCR_DOWNSHIFT_COUNTER_SHIFT 12
2887
2888/* PHY Specific Status Register (Page 0, Register 17) */
2889#define GG82563_PSSR_JABBER 0x0001 /* 1=Jabber */
2890#define GG82563_PSSR_POLARITY 0x0002 /* 1=Polarity Reversed */
2891#define GG82563_PSSR_LINK 0x0008 /* 1=Link is Up */
2892#define GG82563_PSSR_ENERGY_DETECT 0x0010 /* 1=Sleep, 0=Active */
2893#define GG82563_PSSR_DOWNSHIFT 0x0020 /* 1=Downshift */
2894#define GG82563_PSSR_CROSSOVER_STATUS 0x0040 /* 1=MDIX, 0=MDI */
2895#define GG82563_PSSR_RX_PAUSE_ENABLED 0x0100 /* 1=Receive Pause Enabled */
2896#define GG82563_PSSR_TX_PAUSE_ENABLED 0x0200 /* 1=Transmit Pause Enabled */
2897#define GG82563_PSSR_LINK_UP 0x0400 /* 1=Link Up */
2898#define GG82563_PSSR_SPEED_DUPLEX_RESOLVED 0x0800 /* 1=Resolved */
2899#define GG82563_PSSR_PAGE_RECEIVED 0x1000 /* 1=Page Received */
2900#define GG82563_PSSR_DUPLEX 0x2000 /* 1-Full-Duplex */
2901#define GG82563_PSSR_SPEED_MASK 0xC000
2902#define GG82563_PSSR_SPEED_10MBPS 0x0000 /* 00=10Mbps */
2903#define GG82563_PSSR_SPEED_100MBPS 0x4000 /* 01=100Mbps */
2904#define GG82563_PSSR_SPEED_1000MBPS 0x8000 /* 10=1000Mbps */
2905
2906/* PHY Specific Status Register 2 (Page 0, Register 19) */
2907#define GG82563_PSSR2_JABBER 0x0001 /* 1=Jabber */
2908#define GG82563_PSSR2_POLARITY_CHANGED 0x0002 /* 1=Polarity Changed */
2909#define GG82563_PSSR2_ENERGY_DETECT_CHANGED 0x0010 /* 1=Energy Detect Changed */
2910#define GG82563_PSSR2_DOWNSHIFT_INTERRUPT 0x0020 /* 1=Downshift Detected */
2911#define GG82563_PSSR2_MDI_CROSSOVER_CHANGE 0x0040 /* 1=Crossover Changed */
2912#define GG82563_PSSR2_FALSE_CARRIER 0x0100 /* 1=False Carrier */
2913#define GG82563_PSSR2_SYMBOL_ERROR 0x0200 /* 1=Symbol Error */
2914#define GG82563_PSSR2_LINK_STATUS_CHANGED 0x0400 /* 1=Link Status Changed */
2915#define GG82563_PSSR2_AUTO_NEG_COMPLETED 0x0800 /* 1=Auto-Neg Completed */
2916#define GG82563_PSSR2_PAGE_RECEIVED 0x1000 /* 1=Page Received */
2917#define GG82563_PSSR2_DUPLEX_CHANGED 0x2000 /* 1=Duplex Changed */
2918#define GG82563_PSSR2_SPEED_CHANGED 0x4000 /* 1=Speed Changed */
2919#define GG82563_PSSR2_AUTO_NEG_ERROR 0x8000 /* 1=Auto-Neg Error */
2920
2921/* PHY Specific Control Register 2 (Page 0, Register 26) */
2922#define GG82563_PSCR2_10BT_POLARITY_FORCE 0x0002 /* 1=Force Negative Polarity */
2923#define GG82563_PSCR2_1000MB_TEST_SELECT_MASK 0x000C
2924#define GG82563_PSCR2_1000MB_TEST_SELECT_NORMAL 0x0000 /* 00,01=Normal Operation */
2925#define GG82563_PSCR2_1000MB_TEST_SELECT_112NS 0x0008 /* 10=Select 112ns Sequence */
2926#define GG82563_PSCR2_1000MB_TEST_SELECT_16NS 0x000C /* 11=Select 16ns Sequence */
2927#define GG82563_PSCR2_REVERSE_AUTO_NEG 0x2000 /* 1=Reverse Auto-Negotiation */
2928#define GG82563_PSCR2_1000BT_DISABLE 0x4000 /* 1=Disable 1000BASE-T */
2929#define GG82563_PSCR2_TRANSMITER_TYPE_MASK 0x8000
2930#define GG82563_PSCR2_TRANSMITTER_TYPE_CLASS_B 0x0000 /* 0=Class B */
2931#define GG82563_PSCR2_TRANSMITTER_TYPE_CLASS_A 0x8000 /* 1=Class A */
2932
2933/* MAC Specific Control Register (Page 2, Register 21) */
2934/* Tx clock speed for Link Down and 1000BASE-T for the following speeds */
2935#define GG82563_MSCR_TX_CLK_MASK 0x0007
2936#define GG82563_MSCR_TX_CLK_10MBPS_2_5MHZ 0x0004
2937#define GG82563_MSCR_TX_CLK_100MBPS_25MHZ 0x0005
2938#define GG82563_MSCR_TX_CLK_1000MBPS_2_5MHZ 0x0006
2939#define GG82563_MSCR_TX_CLK_1000MBPS_25MHZ 0x0007
2940
2941#define GG82563_MSCR_ASSERT_CRS_ON_TX 0x0010 /* 1=Assert */
2942
2943/* DSP Distance Register (Page 5, Register 26) */
2944#define GG82563_DSPD_CABLE_LENGTH 0x0007 /* 0 = <50M;
2945 1 = 50-80M;
2946 2 = 80-110M;
2947 3 = 110-140M;
2948 4 = >140M */
2949
2950/* Kumeran Mode Control Register (Page 193, Register 16) */
2951#define GG82563_KMCR_PHY_LEDS_EN 0x0020 /* 1=PHY LEDs, 0=Kumeran Inband LEDs */
2952#define GG82563_KMCR_FORCE_LINK_UP 0x0040 /* 1=Force Link Up */
2953#define GG82563_KMCR_SUPPRESS_SGMII_EPD_EXT 0x0080
2954#define GG82563_KMCR_MDIO_BUS_SPEED_SELECT_MASK 0x0400
2955#define GG82563_KMCR_MDIO_BUS_SPEED_SELECT 0x0400 /* 1=6.25MHz, 0=0.8MHz */
2956#define GG82563_KMCR_PASS_FALSE_CARRIER 0x0800
2957
2958/* Power Management Control Register (Page 193, Register 20) */
2959#define GG82563_PMCR_ENABLE_ELECTRICAL_IDLE 0x0001 /* 1=Enalbe SERDES Electrical Idle */
2960#define GG82563_PMCR_DISABLE_PORT 0x0002 /* 1=Disable Port */
2961#define GG82563_PMCR_DISABLE_SERDES 0x0004 /* 1=Disable SERDES */
2962#define GG82563_PMCR_REVERSE_AUTO_NEG 0x0008 /* 1=Enable Reverse Auto-Negotiation */
2963#define GG82563_PMCR_DISABLE_1000_NON_D0 0x0010 /* 1=Disable 1000Mbps Auto-Neg in non D0 */
2964#define GG82563_PMCR_DISABLE_1000 0x0020 /* 1=Disable 1000Mbps Auto-Neg Always */
2965#define GG82563_PMCR_REVERSE_AUTO_NEG_D0A 0x0040 /* 1=Enable D0a Reverse Auto-Negotiation */
2966#define GG82563_PMCR_FORCE_POWER_STATE 0x0080 /* 1=Force Power State */
2967#define GG82563_PMCR_PROGRAMMED_POWER_STATE_MASK 0x0300
2968#define GG82563_PMCR_PROGRAMMED_POWER_STATE_DR 0x0000 /* 00=Dr */
2969#define GG82563_PMCR_PROGRAMMED_POWER_STATE_D0U 0x0100 /* 01=D0u */
2970#define GG82563_PMCR_PROGRAMMED_POWER_STATE_D0A 0x0200 /* 10=D0a */
2971#define GG82563_PMCR_PROGRAMMED_POWER_STATE_D3 0x0300 /* 11=D3 */
2972
2973/* In-Band Control Register (Page 194, Register 18) */
2974#define GG82563_ICR_DIS_PADDING 0x0010 /* Disable Padding Use */
2975
2690 2976
2691/* Bit definitions for valid PHY IDs. */ 2977/* Bit definitions for valid PHY IDs. */
2692/* I = Integrated 2978/* I = Integrated
@@ -2701,6 +2987,7 @@ struct e1000_host_command_info {
2701#define M88E1011_I_REV_4 0x04 2987#define M88E1011_I_REV_4 0x04
2702#define M88E1111_I_PHY_ID 0x01410CC0 2988#define M88E1111_I_PHY_ID 0x01410CC0
2703#define L1LXT971A_PHY_ID 0x001378E0 2989#define L1LXT971A_PHY_ID 0x001378E0
2990#define GG82563_E_PHY_ID 0x01410CA0
2704 2991
2705/* Miscellaneous PHY bit definitions. */ 2992/* Miscellaneous PHY bit definitions. */
2706#define PHY_PREAMBLE 0xFFFFFFFF 2993#define PHY_PREAMBLE 0xFFFFFFFF