aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/e1000_defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/igb/e1000_defines.h')
-rw-r--r--drivers/net/igb/e1000_defines.h57
1 files changed, 49 insertions, 8 deletions
diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
index cb916833f303..fe6cf1b696c7 100644
--- a/drivers/net/igb/e1000_defines.h
+++ b/drivers/net/igb/e1000_defines.h
@@ -49,6 +49,7 @@
49#define E1000_CTRL_EXT_PFRSTD 0x00004000 49#define E1000_CTRL_EXT_PFRSTD 0x00004000
50#define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000 50#define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000
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_SGMII 0x00800000 53#define E1000_CTRL_EXT_LINK_MODE_SGMII 0x00800000
53#define E1000_CTRL_EXT_EIAME 0x01000000 54#define E1000_CTRL_EXT_EIAME 0x01000000
54#define E1000_CTRL_EXT_IRCA 0x00000001 55#define E1000_CTRL_EXT_IRCA 0x00000001
@@ -312,12 +313,6 @@
312#define E1000_PBA_34K 0x0022 313#define E1000_PBA_34K 0x0022
313#define E1000_PBA_64K 0x0040 /* 64KB */ 314#define E1000_PBA_64K 0x0040 /* 64KB */
314 315
315#define IFS_MAX 80
316#define IFS_MIN 40
317#define IFS_RATIO 4
318#define IFS_STEP 10
319#define MIN_NUM_XMITS 1000
320
321/* SW Semaphore Register */ 316/* SW Semaphore Register */
322#define E1000_SWSM_SMBI 0x00000001 /* Driver Semaphore bit */ 317#define E1000_SWSM_SMBI 0x00000001 /* Driver Semaphore bit */
323#define E1000_SWSM_SWESMBI 0x00000002 /* FW Semaphore bit */ 318#define E1000_SWSM_SWESMBI 0x00000002 /* FW Semaphore bit */
@@ -329,6 +324,7 @@
329#define E1000_ICR_RXDMT0 0x00000010 /* rx desc min. threshold (0) */ 324#define E1000_ICR_RXDMT0 0x00000010 /* rx desc min. threshold (0) */
330#define E1000_ICR_RXT0 0x00000080 /* rx timer intr (ring 0) */ 325#define E1000_ICR_RXT0 0x00000080 /* rx timer intr (ring 0) */
331#define E1000_ICR_VMMB 0x00000100 /* VM MB event */ 326#define E1000_ICR_VMMB 0x00000100 /* VM MB event */
327#define E1000_ICR_DRSTA 0x40000000 /* Device Reset Asserted */
332/* If this bit asserted, the driver should claim the interrupt */ 328/* If this bit asserted, the driver should claim the interrupt */
333#define E1000_ICR_INT_ASSERTED 0x80000000 329#define E1000_ICR_INT_ASSERTED 0x80000000
334/* LAN connected device generates an interrupt */ 330/* LAN connected device generates an interrupt */
@@ -370,6 +366,7 @@
370#define E1000_IMS_RXSEQ E1000_ICR_RXSEQ /* rx sequence error */ 366#define E1000_IMS_RXSEQ E1000_ICR_RXSEQ /* rx sequence error */
371#define E1000_IMS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ 367#define E1000_IMS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */
372#define E1000_IMS_RXT0 E1000_ICR_RXT0 /* rx timer intr */ 368#define E1000_IMS_RXT0 E1000_ICR_RXT0 /* rx timer intr */
369#define E1000_IMS_DRSTA E1000_ICR_DRSTA /* Device Reset Asserted */
373#define E1000_IMS_DOUTSYNC E1000_ICR_DOUTSYNC /* NIC DMA out of sync */ 370#define E1000_IMS_DOUTSYNC E1000_ICR_DOUTSYNC /* NIC DMA out of sync */
374 371
375/* Extended Interrupt Mask Set */ 372/* Extended Interrupt Mask Set */
@@ -378,6 +375,7 @@
378/* Interrupt Cause Set */ 375/* Interrupt Cause Set */
379#define E1000_ICS_LSC E1000_ICR_LSC /* Link Status Change */ 376#define E1000_ICS_LSC E1000_ICR_LSC /* Link Status Change */
380#define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ 377#define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */
378#define E1000_ICS_DRSTA E1000_ICR_DRSTA /* Device Reset Aserted */
381 379
382/* Extended Interrupt Cause Set */ 380/* Extended Interrupt Cause Set */
383 381
@@ -435,6 +433,39 @@
435/* Flow Control */ 433/* Flow Control */
436#define E1000_FCRTL_XONE 0x80000000 /* Enable XON frame transmission */ 434#define E1000_FCRTL_XONE 0x80000000 /* Enable XON frame transmission */
437 435
436#define E1000_TSYNCTXCTL_VALID 0x00000001 /* tx timestamp valid */
437#define E1000_TSYNCTXCTL_ENABLED 0x00000010 /* enable tx timestampping */
438
439#define E1000_TSYNCRXCTL_VALID 0x00000001 /* rx timestamp valid */
440#define E1000_TSYNCRXCTL_TYPE_MASK 0x0000000E /* rx type mask */
441#define E1000_TSYNCRXCTL_TYPE_L2_V2 0x00
442#define E1000_TSYNCRXCTL_TYPE_L4_V1 0x02
443#define E1000_TSYNCRXCTL_TYPE_L2_L4_V2 0x04
444#define E1000_TSYNCRXCTL_TYPE_ALL 0x08
445#define E1000_TSYNCRXCTL_TYPE_EVENT_V2 0x0A
446#define E1000_TSYNCRXCTL_ENABLED 0x00000010 /* enable rx timestampping */
447
448#define E1000_TSYNCRXCFG_PTP_V1_CTRLT_MASK 0x000000FF
449#define E1000_TSYNCRXCFG_PTP_V1_SYNC_MESSAGE 0x00
450#define E1000_TSYNCRXCFG_PTP_V1_DELAY_REQ_MESSAGE 0x01
451#define E1000_TSYNCRXCFG_PTP_V1_FOLLOWUP_MESSAGE 0x02
452#define E1000_TSYNCRXCFG_PTP_V1_DELAY_RESP_MESSAGE 0x03
453#define E1000_TSYNCRXCFG_PTP_V1_MANAGEMENT_MESSAGE 0x04
454
455#define E1000_TSYNCRXCFG_PTP_V2_MSGID_MASK 0x00000F00
456#define E1000_TSYNCRXCFG_PTP_V2_SYNC_MESSAGE 0x0000
457#define E1000_TSYNCRXCFG_PTP_V2_DELAY_REQ_MESSAGE 0x0100
458#define E1000_TSYNCRXCFG_PTP_V2_PATH_DELAY_REQ_MESSAGE 0x0200
459#define E1000_TSYNCRXCFG_PTP_V2_PATH_DELAY_RESP_MESSAGE 0x0300
460#define E1000_TSYNCRXCFG_PTP_V2_FOLLOWUP_MESSAGE 0x0800
461#define E1000_TSYNCRXCFG_PTP_V2_DELAY_RESP_MESSAGE 0x0900
462#define E1000_TSYNCRXCFG_PTP_V2_PATH_DELAY_FOLLOWUP_MESSAGE 0x0A00
463#define E1000_TSYNCRXCFG_PTP_V2_ANNOUNCE_MESSAGE 0x0B00
464#define E1000_TSYNCRXCFG_PTP_V2_SIGNALLING_MESSAGE 0x0C00
465#define E1000_TSYNCRXCFG_PTP_V2_MANAGEMENT_MESSAGE 0x0D00
466
467#define E1000_TIMINCA_16NS_SHIFT 24
468
438/* PCI Express Control */ 469/* PCI Express Control */
439#define E1000_GCR_CMPL_TMOUT_MASK 0x0000F000 470#define E1000_GCR_CMPL_TMOUT_MASK 0x0000F000
440#define E1000_GCR_CMPL_TMOUT_10ms 0x00001000 471#define E1000_GCR_CMPL_TMOUT_10ms 0x00001000
@@ -444,6 +475,7 @@
444/* PHY Control Register */ 475/* PHY Control Register */
445#define MII_CR_FULL_DUPLEX 0x0100 /* FDX =1, half duplex =0 */ 476#define MII_CR_FULL_DUPLEX 0x0100 /* FDX =1, half duplex =0 */
446#define MII_CR_RESTART_AUTO_NEG 0x0200 /* Restart auto negotiation */ 477#define MII_CR_RESTART_AUTO_NEG 0x0200 /* Restart auto negotiation */
478#define MII_CR_POWER_DOWN 0x0800 /* Power down */
447#define MII_CR_AUTO_NEG_EN 0x1000 /* Auto Neg Enable */ 479#define MII_CR_AUTO_NEG_EN 0x1000 /* Auto Neg Enable */
448#define MII_CR_LOOPBACK 0x4000 /* 0 = normal, 1 = loopback */ 480#define MII_CR_LOOPBACK 0x4000 /* 0 = normal, 1 = loopback */
449#define MII_CR_RESET 0x8000 /* 0 = normal, 1 = PHY reset */ 481#define MII_CR_RESET 0x8000 /* 0 = normal, 1 = PHY reset */
@@ -524,8 +556,12 @@
524#define NVM_ALT_MAC_ADDR_PTR 0x0037 556#define NVM_ALT_MAC_ADDR_PTR 0x0037
525#define NVM_CHECKSUM_REG 0x003F 557#define NVM_CHECKSUM_REG 0x003F
526 558
527#define E1000_NVM_CFG_DONE_PORT_0 0x40000 /* MNG config cycle done */ 559#define E1000_NVM_CFG_DONE_PORT_0 0x040000 /* MNG config cycle done */
528#define E1000_NVM_CFG_DONE_PORT_1 0x80000 /* ...for second port */ 560#define E1000_NVM_CFG_DONE_PORT_1 0x080000 /* ...for second port */
561#define E1000_NVM_CFG_DONE_PORT_2 0x100000 /* ...for third port */
562#define E1000_NVM_CFG_DONE_PORT_3 0x200000 /* ...for fourth port */
563
564#define NVM_82580_LAN_FUNC_OFFSET(a) (a ? (0x40 + (0x40 * a)) : 0)
529 565
530/* Mask bits for fields in Word 0x0f of the NVM */ 566/* Mask bits for fields in Word 0x0f of the NVM */
531#define NVM_WORD0F_PAUSE_MASK 0x3000 567#define NVM_WORD0F_PAUSE_MASK 0x3000
@@ -592,6 +628,7 @@
592 */ 628 */
593#define M88E1111_I_PHY_ID 0x01410CC0 629#define M88E1111_I_PHY_ID 0x01410CC0
594#define IGP03E1000_E_PHY_ID 0x02A80390 630#define IGP03E1000_E_PHY_ID 0x02A80390
631#define I82580_I_PHY_ID 0x015403A0
595#define M88_VENDOR 0x0141 632#define M88_VENDOR 0x0141
596 633
597/* M88E1000 Specific Registers */ 634/* M88E1000 Specific Registers */
@@ -678,4 +715,8 @@
678#define E1000_VFTA_ENTRY_MASK 0x7F 715#define E1000_VFTA_ENTRY_MASK 0x7F
679#define E1000_VFTA_ENTRY_BIT_SHIFT_MASK 0x1F 716#define E1000_VFTA_ENTRY_BIT_SHIFT_MASK 0x1F
680 717
718/* DMA Coalescing register fields */
719#define E1000_PCIEMISC_LX_DECISION 0x00000080 /* Lx power decision based
720 on DMA coal */
721
681#endif 722#endif