aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_hw.h
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2009-09-25 08:16:14 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-26 23:15:23 -0400
commit1532ecea1debf8d2cd50c99e299ad35f43a55291 (patch)
treef7a0e1a201e8f596a259f0808e93c181e5f119d9 /drivers/net/e1000/e1000_hw.h
parent99c4a6344f6574c97019ac16e8d54bfe5ad21f2d (diff)
e1000: drop dead pcie code from e1000
this patch is the first in a series of clean up patches for e1000 to drop unused code, and update the driver to kernel spec, and then, to update the driver to have all available bug fixes. Call it the e1000 weight loss plan. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000/e1000_hw.h')
-rw-r--r--drivers/net/e1000/e1000_hw.h341
1 files changed, 1 insertions, 340 deletions
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index a8866bdbb671..243dad25bccc 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -57,11 +57,6 @@ typedef enum {
57 e1000_82541_rev_2, 57 e1000_82541_rev_2,
58 e1000_82547, 58 e1000_82547,
59 e1000_82547_rev_2, 59 e1000_82547_rev_2,
60 e1000_82571,
61 e1000_82572,
62 e1000_82573,
63 e1000_80003es2lan,
64 e1000_ich8lan,
65 e1000_num_macs 60 e1000_num_macs
66} e1000_mac_type; 61} e1000_mac_type;
67 62
@@ -70,7 +65,6 @@ typedef enum {
70 e1000_eeprom_spi, 65 e1000_eeprom_spi,
71 e1000_eeprom_microwire, 66 e1000_eeprom_microwire,
72 e1000_eeprom_flash, 67 e1000_eeprom_flash,
73 e1000_eeprom_ich8,
74 e1000_eeprom_none, /* No NVM support */ 68 e1000_eeprom_none, /* No NVM support */
75 e1000_num_eeprom_types 69 e1000_num_eeprom_types
76} e1000_eeprom_type; 70} e1000_eeprom_type;
@@ -109,7 +103,6 @@ typedef enum {
109 e1000_bus_type_unknown = 0, 103 e1000_bus_type_unknown = 0,
110 e1000_bus_type_pci, 104 e1000_bus_type_pci,
111 e1000_bus_type_pcix, 105 e1000_bus_type_pcix,
112 e1000_bus_type_pci_express,
113 e1000_bus_type_reserved 106 e1000_bus_type_reserved
114} e1000_bus_type; 107} e1000_bus_type;
115 108
@@ -121,18 +114,12 @@ typedef enum {
121 e1000_bus_speed_100, 114 e1000_bus_speed_100,
122 e1000_bus_speed_120, 115 e1000_bus_speed_120,
123 e1000_bus_speed_133, 116 e1000_bus_speed_133,
124 e1000_bus_speed_2500,
125 e1000_bus_speed_reserved 117 e1000_bus_speed_reserved
126} e1000_bus_speed; 118} e1000_bus_speed;
127 119
128/* PCI bus widths */ 120/* PCI bus widths */
129typedef enum { 121typedef enum {
130 e1000_bus_width_unknown = 0, 122 e1000_bus_width_unknown = 0,
131 /* These PCIe values should literally match the possible return values
132 * from config space */
133 e1000_bus_width_pciex_1 = 1,
134 e1000_bus_width_pciex_2 = 2,
135 e1000_bus_width_pciex_4 = 4,
136 e1000_bus_width_32, 123 e1000_bus_width_32,
137 e1000_bus_width_64, 124 e1000_bus_width_64,
138 e1000_bus_width_reserved 125 e1000_bus_width_reserved
@@ -224,10 +211,6 @@ typedef enum {
224typedef enum { 211typedef enum {
225 e1000_phy_m88 = 0, 212 e1000_phy_m88 = 0,
226 e1000_phy_igp, 213 e1000_phy_igp,
227 e1000_phy_igp_2,
228 e1000_phy_gg82563,
229 e1000_phy_igp_3,
230 e1000_phy_ife,
231 e1000_phy_undefined = 0xFF 214 e1000_phy_undefined = 0xFF
232} e1000_phy_type; 215} e1000_phy_type;
233 216
@@ -329,8 +312,6 @@ s32 e1000_phy_reset(struct e1000_hw *hw);
329s32 e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); 312s32 e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info);
330s32 e1000_validate_mdi_setting(struct e1000_hw *hw); 313s32 e1000_validate_mdi_setting(struct e1000_hw *hw);
331 314
332void e1000_phy_powerdown_workaround(struct e1000_hw *hw);
333
334/* EEPROM Functions */ 315/* EEPROM Functions */
335s32 e1000_init_eeprom_params(struct e1000_hw *hw); 316s32 e1000_init_eeprom_params(struct e1000_hw *hw);
336 317
@@ -389,8 +370,6 @@ struct e1000_host_mng_dhcp_cookie{
389}; 370};
390#endif 371#endif
391 372
392s32 e1000_mng_write_dhcp_info(struct e1000_hw *hw, u8 *buffer,
393 u16 length);
394bool e1000_check_mng_mode(struct e1000_hw *hw); 373bool e1000_check_mng_mode(struct e1000_hw *hw);
395bool e1000_enable_tx_pkt_filtering(struct e1000_hw *hw); 374bool e1000_enable_tx_pkt_filtering(struct e1000_hw *hw);
396s32 e1000_read_eeprom(struct e1000_hw *hw, u16 reg, u16 words, u16 *data); 375s32 e1000_read_eeprom(struct e1000_hw *hw, u16 reg, u16 words, u16 *data);
@@ -421,13 +400,10 @@ void e1000_tbi_adjust_stats(struct e1000_hw *hw, struct e1000_hw_stats *stats, u
421void e1000_get_bus_info(struct e1000_hw *hw); 400void e1000_get_bus_info(struct e1000_hw *hw);
422void e1000_pci_set_mwi(struct e1000_hw *hw); 401void e1000_pci_set_mwi(struct e1000_hw *hw);
423void e1000_pci_clear_mwi(struct e1000_hw *hw); 402void e1000_pci_clear_mwi(struct e1000_hw *hw);
424s32 e1000_read_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value);
425void e1000_pcix_set_mmrbc(struct e1000_hw *hw, int mmrbc); 403void e1000_pcix_set_mmrbc(struct e1000_hw *hw, int mmrbc);
426int e1000_pcix_get_mmrbc(struct e1000_hw *hw); 404int e1000_pcix_get_mmrbc(struct e1000_hw *hw);
427/* Port I/O is only supported on 82544 and newer */ 405/* Port I/O is only supported on 82544 and newer */
428void e1000_io_write(struct e1000_hw *hw, unsigned long port, u32 value); 406void e1000_io_write(struct e1000_hw *hw, unsigned long port, u32 value);
429s32 e1000_disable_pciex_master(struct e1000_hw *hw);
430s32 e1000_check_phy_reset_block(struct e1000_hw *hw);
431 407
432 408
433#define E1000_READ_REG_IO(a, reg) \ 409#define E1000_READ_REG_IO(a, reg) \
@@ -471,36 +447,7 @@ s32 e1000_check_phy_reset_block(struct e1000_hw *hw);
471#define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099 447#define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099
472#define E1000_DEV_ID_82547EI 0x1019 448#define E1000_DEV_ID_82547EI 0x1019
473#define E1000_DEV_ID_82547EI_MOBILE 0x101A 449#define E1000_DEV_ID_82547EI_MOBILE 0x101A
474#define E1000_DEV_ID_82571EB_COPPER 0x105E
475#define E1000_DEV_ID_82571EB_FIBER 0x105F
476#define E1000_DEV_ID_82571EB_SERDES 0x1060
477#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4
478#define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5
479#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5
480#define E1000_DEV_ID_82571EB_QUAD_COPPER_LOWPROFILE 0x10BC
481#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9
482#define E1000_DEV_ID_82571EB_SERDES_QUAD 0x10DA
483#define E1000_DEV_ID_82572EI_COPPER 0x107D
484#define E1000_DEV_ID_82572EI_FIBER 0x107E
485#define E1000_DEV_ID_82572EI_SERDES 0x107F
486#define E1000_DEV_ID_82572EI 0x10B9
487#define E1000_DEV_ID_82573E 0x108B
488#define E1000_DEV_ID_82573E_IAMT 0x108C
489#define E1000_DEV_ID_82573L 0x109A
490#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 450#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5
491#define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096
492#define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098
493#define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA
494#define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB
495
496#define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049
497#define E1000_DEV_ID_ICH8_IGP_AMT 0x104A
498#define E1000_DEV_ID_ICH8_IGP_C 0x104B
499#define E1000_DEV_ID_ICH8_IFE 0x104C
500#define E1000_DEV_ID_ICH8_IFE_GT 0x10C4
501#define E1000_DEV_ID_ICH8_IFE_G 0x10C5
502#define E1000_DEV_ID_ICH8_IGP_M 0x104D
503
504 451
505#define NODE_ADDRESS_SIZE 6 452#define NODE_ADDRESS_SIZE 6
506#define ETH_LENGTH_OF_ADDRESS 6 453#define ETH_LENGTH_OF_ADDRESS 6
@@ -567,15 +514,6 @@ s32 e1000_check_phy_reset_block(struct e1000_hw *hw);
567 E1000_IMS_RXSEQ | \ 514 E1000_IMS_RXSEQ | \
568 E1000_IMS_LSC) 515 E1000_IMS_LSC)
569 516
570/* Additional interrupts need to be handled for e1000_ich8lan:
571 DSW = The FW changed the status of the DISSW bit in FWSM
572 PHYINT = The LAN connected device generates an interrupt
573 EPRST = Manageability reset event */
574#define IMS_ICH8LAN_ENABLE_MASK (\
575 E1000_IMS_DSW | \
576 E1000_IMS_PHYINT | \
577 E1000_IMS_EPRST)
578
579/* Number of high/low register pairs in the RAR. The RAR (Receive Address 517/* Number of high/low register pairs in the RAR. The RAR (Receive Address
580 * Registers) holds the directed and multicast addresses that we monitor. We 518 * Registers) holds the directed and multicast addresses that we monitor. We
581 * reserve one of these spots for our directed address, allowing us room for 519 * reserve one of these spots for our directed address, allowing us room for
@@ -583,8 +521,6 @@ s32 e1000_check_phy_reset_block(struct e1000_hw *hw);
583 */ 521 */
584#define E1000_RAR_ENTRIES 15 522#define E1000_RAR_ENTRIES 15
585 523
586#define E1000_RAR_ENTRIES_ICH8LAN 6
587
588#define MIN_NUMBER_OF_DESCRIPTORS 8 524#define MIN_NUMBER_OF_DESCRIPTORS 8
589#define MAX_NUMBER_OF_DESCRIPTORS 0xFFF8 525#define MAX_NUMBER_OF_DESCRIPTORS 0xFFF8
590 526
@@ -806,10 +742,6 @@ struct e1000_data_desc {
806#define E1000_MC_TBL_SIZE 128 /* Multicast Filter Table (4096 bits) */ 742#define E1000_MC_TBL_SIZE 128 /* Multicast Filter Table (4096 bits) */
807#define E1000_VLAN_FILTER_TBL_SIZE 128 /* VLAN Filter Table (4096 bits) */ 743#define E1000_VLAN_FILTER_TBL_SIZE 128 /* VLAN Filter Table (4096 bits) */
808 744
809#define E1000_NUM_UNICAST_ICH8LAN 7
810#define E1000_MC_TBL_SIZE_ICH8LAN 32
811
812
813/* Receive Address Register */ 745/* Receive Address Register */
814struct e1000_rar { 746struct e1000_rar {
815 volatile __le32 low; /* receive address low */ 747 volatile __le32 low; /* receive address low */
@@ -818,7 +750,6 @@ struct e1000_rar {
818 750
819/* Number of entries in the Multicast Table Array (MTA). */ 751/* Number of entries in the Multicast Table Array (MTA). */
820#define E1000_NUM_MTA_REGISTERS 128 752#define E1000_NUM_MTA_REGISTERS 128
821#define E1000_NUM_MTA_REGISTERS_ICH8LAN 32
822 753
823/* IPv4 Address Table Entry */ 754/* IPv4 Address Table Entry */
824struct e1000_ipv4_at_entry { 755struct e1000_ipv4_at_entry {
@@ -829,7 +760,6 @@ struct e1000_ipv4_at_entry {
829/* Four wakeup IP addresses are supported */ 760/* Four wakeup IP addresses are supported */
830#define E1000_WAKEUP_IP_ADDRESS_COUNT_MAX 4 761#define E1000_WAKEUP_IP_ADDRESS_COUNT_MAX 4
831#define E1000_IP4AT_SIZE E1000_WAKEUP_IP_ADDRESS_COUNT_MAX 762#define E1000_IP4AT_SIZE E1000_WAKEUP_IP_ADDRESS_COUNT_MAX
832#define E1000_IP4AT_SIZE_ICH8LAN 3
833#define E1000_IP6AT_SIZE 1 763#define E1000_IP6AT_SIZE 1
834 764
835/* IPv6 Address Table Entry */ 765/* IPv6 Address Table Entry */
@@ -1063,7 +993,6 @@ struct e1000_ffvt_entry {
1063 993
1064#define E1000_KUMCTRLSTA 0x00034 /* MAC-PHY interface - RW */ 994#define E1000_KUMCTRLSTA 0x00034 /* MAC-PHY interface - RW */
1065#define E1000_MDPHYA 0x0003C /* PHY address - RW */ 995#define E1000_MDPHYA 0x0003C /* PHY address - RW */
1066#define E1000_MANC2H 0x05860 /* Managment Control To Host - RW */
1067#define E1000_SW_FW_SYNC 0x05B5C /* Software-Firmware Synchronization - RW */ 996#define E1000_SW_FW_SYNC 0x05B5C /* Software-Firmware Synchronization - RW */
1068 997
1069#define E1000_GCR 0x05B00 /* PCI-Ex Control */ 998#define E1000_GCR 0x05B00 /* PCI-Ex Control */
@@ -1302,7 +1231,6 @@ struct e1000_ffvt_entry {
1302#define E1000_82542_RSSIR E1000_RSSIR 1231#define E1000_82542_RSSIR E1000_RSSIR
1303#define E1000_82542_KUMCTRLSTA E1000_KUMCTRLSTA 1232#define E1000_82542_KUMCTRLSTA E1000_KUMCTRLSTA
1304#define E1000_82542_SW_FW_SYNC E1000_SW_FW_SYNC 1233#define E1000_82542_SW_FW_SYNC E1000_SW_FW_SYNC
1305#define E1000_82542_MANC2H E1000_MANC2H
1306 1234
1307/* Statistics counters collected by the MAC */ 1235/* Statistics counters collected by the MAC */
1308struct e1000_hw_stats { 1236struct e1000_hw_stats {
@@ -1399,8 +1327,7 @@ struct e1000_hw {
1399 e1000_ffe_config ffe_config_state; 1327 e1000_ffe_config ffe_config_state;
1400 u32 asf_firmware_present; 1328 u32 asf_firmware_present;
1401 u32 eeprom_semaphore_present; 1329 u32 eeprom_semaphore_present;
1402 u32 swfw_sync_present; 1330 u32 swfw_sync_present;
1403 u32 swfwhw_semaphore_present;
1404 unsigned long io_base; 1331 unsigned long io_base;
1405 u32 phy_id; 1332 u32 phy_id;
1406 u32 phy_revision; 1333 u32 phy_revision;
@@ -1461,10 +1388,7 @@ struct e1000_hw {
1461 bool in_ifs_mode; 1388 bool in_ifs_mode;
1462 bool mng_reg_access_disabled; 1389 bool mng_reg_access_disabled;
1463 bool leave_av_bit_off; 1390 bool leave_av_bit_off;
1464 bool kmrn_lock_loss_workaround_disabled;
1465 bool bad_tx_carr_stats_fd; 1391 bool bad_tx_carr_stats_fd;
1466 bool has_manc2h;
1467 bool rx_needs_kicking;
1468 bool has_smbus; 1392 bool has_smbus;
1469}; 1393};
1470 1394
@@ -2018,8 +1942,6 @@ struct e1000_hw {
2018#define E1000_TCTL_EXT_BST_MASK 0x000003FF /* Backoff Slot Time */ 1942#define E1000_TCTL_EXT_BST_MASK 0x000003FF /* Backoff Slot Time */
2019#define E1000_TCTL_EXT_GCEX_MASK 0x000FFC00 /* Gigabit Carry Extend Padding */ 1943#define E1000_TCTL_EXT_GCEX_MASK 0x000FFC00 /* Gigabit Carry Extend Padding */
2020 1944
2021#define DEFAULT_80003ES2LAN_TCTL_EXT_GCEX 0x00010000
2022
2023/* Receive Checksum Control */ 1945/* Receive Checksum Control */
2024#define E1000_RXCSUM_PCSS_MASK 0x000000FF /* Packet Checksum Start */ 1946#define E1000_RXCSUM_PCSS_MASK 0x000000FF /* Packet Checksum Start */
2025#define E1000_RXCSUM_IPOFL 0x00000100 /* IPv4 checksum offload */ 1947#define E1000_RXCSUM_IPOFL 0x00000100 /* IPv4 checksum offload */
@@ -2289,16 +2211,10 @@ struct e1000_host_command_info {
2289/* Word definitions for ID LED Settings */ 2211/* Word definitions for ID LED Settings */
2290#define ID_LED_RESERVED_0000 0x0000 2212#define ID_LED_RESERVED_0000 0x0000
2291#define ID_LED_RESERVED_FFFF 0xFFFF 2213#define ID_LED_RESERVED_FFFF 0xFFFF
2292#define ID_LED_RESERVED_82573 0xF746
2293#define ID_LED_DEFAULT_82573 0x1811
2294#define ID_LED_DEFAULT ((ID_LED_OFF1_ON2 << 12) | \ 2214#define ID_LED_DEFAULT ((ID_LED_OFF1_ON2 << 12) | \
2295 (ID_LED_OFF1_OFF2 << 8) | \ 2215 (ID_LED_OFF1_OFF2 << 8) | \
2296 (ID_LED_DEF1_DEF2 << 4) | \ 2216 (ID_LED_DEF1_DEF2 << 4) | \
2297 (ID_LED_DEF1_DEF2)) 2217 (ID_LED_DEF1_DEF2))
2298#define ID_LED_DEFAULT_ICH8LAN ((ID_LED_DEF1_DEF2 << 12) | \
2299 (ID_LED_DEF1_OFF2 << 8) | \
2300 (ID_LED_DEF1_ON2 << 4) | \
2301 (ID_LED_DEF1_DEF2))
2302#define ID_LED_DEF1_DEF2 0x1 2218#define ID_LED_DEF1_DEF2 0x1
2303#define ID_LED_DEF1_ON2 0x2 2219#define ID_LED_DEF1_ON2 0x2
2304#define ID_LED_DEF1_OFF2 0x3 2220#define ID_LED_DEF1_OFF2 0x3
@@ -2384,11 +2300,8 @@ struct e1000_host_command_info {
2384 2300
2385#define DEFAULT_82542_TIPG_IPGR2 10 2301#define DEFAULT_82542_TIPG_IPGR2 10
2386#define DEFAULT_82543_TIPG_IPGR2 6 2302#define DEFAULT_82543_TIPG_IPGR2 6
2387#define DEFAULT_80003ES2LAN_TIPG_IPGR2 7
2388#define E1000_TIPG_IPGR2_SHIFT 20 2303#define E1000_TIPG_IPGR2_SHIFT 20
2389 2304
2390#define DEFAULT_80003ES2LAN_TIPG_IPGT_10_100 0x00000009
2391#define DEFAULT_80003ES2LAN_TIPG_IPGT_1000 0x00000008
2392#define E1000_TXDMAC_DPP 0x00000001 2305#define E1000_TXDMAC_DPP 0x00000001
2393 2306
2394/* Adaptive IFS defines */ 2307/* Adaptive IFS defines */
@@ -2485,8 +2398,6 @@ struct e1000_host_command_info {
2485/* Number of milliseconds we wait for auto-negotiation to complete */ 2398/* Number of milliseconds we wait for auto-negotiation to complete */
2486#define LINK_UP_TIMEOUT 500 2399#define LINK_UP_TIMEOUT 500
2487 2400
2488/* Number of 100 microseconds we wait for PCI Express master disable */
2489#define MASTER_DISABLE_TIMEOUT 800
2490/* Number of milliseconds we wait for Eeprom auto read bit done after MAC reset */ 2401/* Number of milliseconds we wait for Eeprom auto read bit done after MAC reset */
2491#define AUTO_READ_DONE_TIMEOUT 10 2402#define AUTO_READ_DONE_TIMEOUT 10
2492/* Number of milliseconds we wait for PHY configuration done after MAC reset */ 2403/* Number of milliseconds we wait for PHY configuration done after MAC reset */
@@ -2636,79 +2547,6 @@ struct e1000_host_command_info {
2636 2547
2637#define IGP01E1000_ANALOG_REGS_PAGE 0x20C0 2548#define IGP01E1000_ANALOG_REGS_PAGE 0x20C0
2638 2549
2639/* Bits...
2640 * 15-5: page
2641 * 4-0: register offset
2642 */
2643#define GG82563_PAGE_SHIFT 5
2644#define GG82563_REG(page, reg) \
2645 (((page) << GG82563_PAGE_SHIFT) | ((reg) & MAX_PHY_REG_ADDRESS))
2646#define GG82563_MIN_ALT_REG 30
2647
2648/* GG82563 Specific Registers */
2649#define GG82563_PHY_SPEC_CTRL \
2650 GG82563_REG(0, 16) /* PHY Specific Control */
2651#define GG82563_PHY_SPEC_STATUS \
2652 GG82563_REG(0, 17) /* PHY Specific Status */
2653#define GG82563_PHY_INT_ENABLE \
2654 GG82563_REG(0, 18) /* Interrupt Enable */
2655#define GG82563_PHY_SPEC_STATUS_2 \
2656 GG82563_REG(0, 19) /* PHY Specific Status 2 */
2657#define GG82563_PHY_RX_ERR_CNTR \
2658 GG82563_REG(0, 21) /* Receive Error Counter */
2659#define GG82563_PHY_PAGE_SELECT \
2660 GG82563_REG(0, 22) /* Page Select */
2661#define GG82563_PHY_SPEC_CTRL_2 \
2662 GG82563_REG(0, 26) /* PHY Specific Control 2 */
2663#define GG82563_PHY_PAGE_SELECT_ALT \
2664 GG82563_REG(0, 29) /* Alternate Page Select */
2665#define GG82563_PHY_TEST_CLK_CTRL \
2666 GG82563_REG(0, 30) /* Test Clock Control (use reg. 29 to select) */
2667
2668#define GG82563_PHY_MAC_SPEC_CTRL \
2669 GG82563_REG(2, 21) /* MAC Specific Control Register */
2670#define GG82563_PHY_MAC_SPEC_CTRL_2 \
2671 GG82563_REG(2, 26) /* MAC Specific Control 2 */
2672
2673#define GG82563_PHY_DSP_DISTANCE \
2674 GG82563_REG(5, 26) /* DSP Distance */
2675
2676/* Page 193 - Port Control Registers */
2677#define GG82563_PHY_KMRN_MODE_CTRL \
2678 GG82563_REG(193, 16) /* Kumeran Mode Control */
2679#define GG82563_PHY_PORT_RESET \
2680 GG82563_REG(193, 17) /* Port Reset */
2681#define GG82563_PHY_REVISION_ID \
2682 GG82563_REG(193, 18) /* Revision ID */
2683#define GG82563_PHY_DEVICE_ID \
2684 GG82563_REG(193, 19) /* Device ID */
2685#define GG82563_PHY_PWR_MGMT_CTRL \
2686 GG82563_REG(193, 20) /* Power Management Control */
2687#define GG82563_PHY_RATE_ADAPT_CTRL \
2688 GG82563_REG(193, 25) /* Rate Adaptation Control */
2689
2690/* Page 194 - KMRN Registers */
2691#define GG82563_PHY_KMRN_FIFO_CTRL_STAT \
2692 GG82563_REG(194, 16) /* FIFO's Control/Status */
2693#define GG82563_PHY_KMRN_CTRL \
2694 GG82563_REG(194, 17) /* Control */
2695#define GG82563_PHY_INBAND_CTRL \
2696 GG82563_REG(194, 18) /* Inband Control */
2697#define GG82563_PHY_KMRN_DIAGNOSTIC \
2698 GG82563_REG(194, 19) /* Diagnostic */
2699#define GG82563_PHY_ACK_TIMEOUTS \
2700 GG82563_REG(194, 20) /* Acknowledge Timeouts */
2701#define GG82563_PHY_ADV_ABILITY \
2702 GG82563_REG(194, 21) /* Advertised Ability */
2703#define GG82563_PHY_LINK_PARTNER_ADV_ABILITY \
2704 GG82563_REG(194, 23) /* Link Partner Advertised Ability */
2705#define GG82563_PHY_ADV_NEXT_PAGE \
2706 GG82563_REG(194, 24) /* Advertised Next Page */
2707#define GG82563_PHY_LINK_PARTNER_ADV_NEXT_PAGE \
2708 GG82563_REG(194, 25) /* Link Partner Advertised Next page */
2709#define GG82563_PHY_KMRN_MISC \
2710 GG82563_REG(194, 26) /* Misc. */
2711
2712/* PHY Control Register */ 2550/* PHY Control Register */
2713#define MII_CR_SPEED_SELECT_MSB 0x0040 /* bits 6,13: 10=1000, 01=100, 00=10 */ 2551#define MII_CR_SPEED_SELECT_MSB 0x0040 /* bits 6,13: 10=1000, 01=100, 00=10 */
2714#define MII_CR_COLL_TEST_ENABLE 0x0080 /* Collision test enable */ 2552#define MII_CR_COLL_TEST_ENABLE 0x0080 /* Collision test enable */
@@ -3032,114 +2870,6 @@ struct e1000_host_command_info {
3032#define IGP01E1000_ANALOG_FUSE_FINE_1 0x0080 2870#define IGP01E1000_ANALOG_FUSE_FINE_1 0x0080
3033#define IGP01E1000_ANALOG_FUSE_FINE_10 0x0500 2871#define IGP01E1000_ANALOG_FUSE_FINE_10 0x0500
3034 2872
3035/* GG82563 PHY Specific Status Register (Page 0, Register 16 */
3036#define GG82563_PSCR_DISABLE_JABBER 0x0001 /* 1=Disable Jabber */
3037#define GG82563_PSCR_POLARITY_REVERSAL_DISABLE 0x0002 /* 1=Polarity Reversal Disabled */
3038#define GG82563_PSCR_POWER_DOWN 0x0004 /* 1=Power Down */
3039#define GG82563_PSCR_COPPER_TRANSMITER_DISABLE 0x0008 /* 1=Transmitter Disabled */
3040#define GG82563_PSCR_CROSSOVER_MODE_MASK 0x0060
3041#define GG82563_PSCR_CROSSOVER_MODE_MDI 0x0000 /* 00=Manual MDI configuration */
3042#define GG82563_PSCR_CROSSOVER_MODE_MDIX 0x0020 /* 01=Manual MDIX configuration */
3043#define GG82563_PSCR_CROSSOVER_MODE_AUTO 0x0060 /* 11=Automatic crossover */
3044#define GG82563_PSCR_ENALBE_EXTENDED_DISTANCE 0x0080 /* 1=Enable Extended Distance */
3045#define GG82563_PSCR_ENERGY_DETECT_MASK 0x0300
3046#define GG82563_PSCR_ENERGY_DETECT_OFF 0x0000 /* 00,01=Off */
3047#define GG82563_PSCR_ENERGY_DETECT_RX 0x0200 /* 10=Sense on Rx only (Energy Detect) */
3048#define GG82563_PSCR_ENERGY_DETECT_RX_TM 0x0300 /* 11=Sense and Tx NLP */
3049#define GG82563_PSCR_FORCE_LINK_GOOD 0x0400 /* 1=Force Link Good */
3050#define GG82563_PSCR_DOWNSHIFT_ENABLE 0x0800 /* 1=Enable Downshift */
3051#define GG82563_PSCR_DOWNSHIFT_COUNTER_MASK 0x7000
3052#define GG82563_PSCR_DOWNSHIFT_COUNTER_SHIFT 12
3053
3054/* PHY Specific Status Register (Page 0, Register 17) */
3055#define GG82563_PSSR_JABBER 0x0001 /* 1=Jabber */
3056#define GG82563_PSSR_POLARITY 0x0002 /* 1=Polarity Reversed */
3057#define GG82563_PSSR_LINK 0x0008 /* 1=Link is Up */
3058#define GG82563_PSSR_ENERGY_DETECT 0x0010 /* 1=Sleep, 0=Active */
3059#define GG82563_PSSR_DOWNSHIFT 0x0020 /* 1=Downshift */
3060#define GG82563_PSSR_CROSSOVER_STATUS 0x0040 /* 1=MDIX, 0=MDI */
3061#define GG82563_PSSR_RX_PAUSE_ENABLED 0x0100 /* 1=Receive Pause Enabled */
3062#define GG82563_PSSR_TX_PAUSE_ENABLED 0x0200 /* 1=Transmit Pause Enabled */
3063#define GG82563_PSSR_LINK_UP 0x0400 /* 1=Link Up */
3064#define GG82563_PSSR_SPEED_DUPLEX_RESOLVED 0x0800 /* 1=Resolved */
3065#define GG82563_PSSR_PAGE_RECEIVED 0x1000 /* 1=Page Received */
3066#define GG82563_PSSR_DUPLEX 0x2000 /* 1-Full-Duplex */
3067#define GG82563_PSSR_SPEED_MASK 0xC000
3068#define GG82563_PSSR_SPEED_10MBPS 0x0000 /* 00=10Mbps */
3069#define GG82563_PSSR_SPEED_100MBPS 0x4000 /* 01=100Mbps */
3070#define GG82563_PSSR_SPEED_1000MBPS 0x8000 /* 10=1000Mbps */
3071
3072/* PHY Specific Status Register 2 (Page 0, Register 19) */
3073#define GG82563_PSSR2_JABBER 0x0001 /* 1=Jabber */
3074#define GG82563_PSSR2_POLARITY_CHANGED 0x0002 /* 1=Polarity Changed */
3075#define GG82563_PSSR2_ENERGY_DETECT_CHANGED 0x0010 /* 1=Energy Detect Changed */
3076#define GG82563_PSSR2_DOWNSHIFT_INTERRUPT 0x0020 /* 1=Downshift Detected */
3077#define GG82563_PSSR2_MDI_CROSSOVER_CHANGE 0x0040 /* 1=Crossover Changed */
3078#define GG82563_PSSR2_FALSE_CARRIER 0x0100 /* 1=False Carrier */
3079#define GG82563_PSSR2_SYMBOL_ERROR 0x0200 /* 1=Symbol Error */
3080#define GG82563_PSSR2_LINK_STATUS_CHANGED 0x0400 /* 1=Link Status Changed */
3081#define GG82563_PSSR2_AUTO_NEG_COMPLETED 0x0800 /* 1=Auto-Neg Completed */
3082#define GG82563_PSSR2_PAGE_RECEIVED 0x1000 /* 1=Page Received */
3083#define GG82563_PSSR2_DUPLEX_CHANGED 0x2000 /* 1=Duplex Changed */
3084#define GG82563_PSSR2_SPEED_CHANGED 0x4000 /* 1=Speed Changed */
3085#define GG82563_PSSR2_AUTO_NEG_ERROR 0x8000 /* 1=Auto-Neg Error */
3086
3087/* PHY Specific Control Register 2 (Page 0, Register 26) */
3088#define GG82563_PSCR2_10BT_POLARITY_FORCE 0x0002 /* 1=Force Negative Polarity */
3089#define GG82563_PSCR2_1000MB_TEST_SELECT_MASK 0x000C
3090#define GG82563_PSCR2_1000MB_TEST_SELECT_NORMAL 0x0000 /* 00,01=Normal Operation */
3091#define GG82563_PSCR2_1000MB_TEST_SELECT_112NS 0x0008 /* 10=Select 112ns Sequence */
3092#define GG82563_PSCR2_1000MB_TEST_SELECT_16NS 0x000C /* 11=Select 16ns Sequence */
3093#define GG82563_PSCR2_REVERSE_AUTO_NEG 0x2000 /* 1=Reverse Auto-Negotiation */
3094#define GG82563_PSCR2_1000BT_DISABLE 0x4000 /* 1=Disable 1000BASE-T */
3095#define GG82563_PSCR2_TRANSMITER_TYPE_MASK 0x8000
3096#define GG82563_PSCR2_TRANSMITTER_TYPE_CLASS_B 0x0000 /* 0=Class B */
3097#define GG82563_PSCR2_TRANSMITTER_TYPE_CLASS_A 0x8000 /* 1=Class A */
3098
3099/* MAC Specific Control Register (Page 2, Register 21) */
3100/* Tx clock speed for Link Down and 1000BASE-T for the following speeds */
3101#define GG82563_MSCR_TX_CLK_MASK 0x0007
3102#define GG82563_MSCR_TX_CLK_10MBPS_2_5MHZ 0x0004
3103#define GG82563_MSCR_TX_CLK_100MBPS_25MHZ 0x0005
3104#define GG82563_MSCR_TX_CLK_1000MBPS_2_5MHZ 0x0006
3105#define GG82563_MSCR_TX_CLK_1000MBPS_25MHZ 0x0007
3106
3107#define GG82563_MSCR_ASSERT_CRS_ON_TX 0x0010 /* 1=Assert */
3108
3109/* DSP Distance Register (Page 5, Register 26) */
3110#define GG82563_DSPD_CABLE_LENGTH 0x0007 /* 0 = <50M;
3111 1 = 50-80M;
3112 2 = 80-110M;
3113 3 = 110-140M;
3114 4 = >140M */
3115
3116/* Kumeran Mode Control Register (Page 193, Register 16) */
3117#define GG82563_KMCR_PHY_LEDS_EN 0x0020 /* 1=PHY LEDs, 0=Kumeran Inband LEDs */
3118#define GG82563_KMCR_FORCE_LINK_UP 0x0040 /* 1=Force Link Up */
3119#define GG82563_KMCR_SUPPRESS_SGMII_EPD_EXT 0x0080
3120#define GG82563_KMCR_MDIO_BUS_SPEED_SELECT_MASK 0x0400
3121#define GG82563_KMCR_MDIO_BUS_SPEED_SELECT 0x0400 /* 1=6.25MHz, 0=0.8MHz */
3122#define GG82563_KMCR_PASS_FALSE_CARRIER 0x0800
3123
3124/* Power Management Control Register (Page 193, Register 20) */
3125#define GG82563_PMCR_ENABLE_ELECTRICAL_IDLE 0x0001 /* 1=Enalbe SERDES Electrical Idle */
3126#define GG82563_PMCR_DISABLE_PORT 0x0002 /* 1=Disable Port */
3127#define GG82563_PMCR_DISABLE_SERDES 0x0004 /* 1=Disable SERDES */
3128#define GG82563_PMCR_REVERSE_AUTO_NEG 0x0008 /* 1=Enable Reverse Auto-Negotiation */
3129#define GG82563_PMCR_DISABLE_1000_NON_D0 0x0010 /* 1=Disable 1000Mbps Auto-Neg in non D0 */
3130#define GG82563_PMCR_DISABLE_1000 0x0020 /* 1=Disable 1000Mbps Auto-Neg Always */
3131#define GG82563_PMCR_REVERSE_AUTO_NEG_D0A 0x0040 /* 1=Enable D0a Reverse Auto-Negotiation */
3132#define GG82563_PMCR_FORCE_POWER_STATE 0x0080 /* 1=Force Power State */
3133#define GG82563_PMCR_PROGRAMMED_POWER_STATE_MASK 0x0300
3134#define GG82563_PMCR_PROGRAMMED_POWER_STATE_DR 0x0000 /* 00=Dr */
3135#define GG82563_PMCR_PROGRAMMED_POWER_STATE_D0U 0x0100 /* 01=D0u */
3136#define GG82563_PMCR_PROGRAMMED_POWER_STATE_D0A 0x0200 /* 10=D0a */
3137#define GG82563_PMCR_PROGRAMMED_POWER_STATE_D3 0x0300 /* 11=D3 */
3138
3139/* In-Band Control Register (Page 194, Register 18) */
3140#define GG82563_ICR_DIS_PADDING 0x0010 /* Disable Padding Use */
3141
3142
3143/* Bit definitions for valid PHY IDs. */ 2873/* Bit definitions for valid PHY IDs. */
3144/* I = Integrated 2874/* I = Integrated
3145 * E = External 2875 * E = External
@@ -3154,7 +2884,6 @@ struct e1000_host_command_info {
3154#define M88E1011_I_REV_4 0x04 2884#define M88E1011_I_REV_4 0x04
3155#define M88E1111_I_PHY_ID 0x01410CC0 2885#define M88E1111_I_PHY_ID 0x01410CC0
3156#define L1LXT971A_PHY_ID 0x001378E0 2886#define L1LXT971A_PHY_ID 0x001378E0
3157#define GG82563_E_PHY_ID 0x01410CA0
3158 2887
3159 2888
3160/* Bits... 2889/* Bits...
@@ -3305,74 +3034,6 @@ struct e1000_host_command_info {
3305#define ICH_GFPREG_BASE_MASK 0x1FFF 3034#define ICH_GFPREG_BASE_MASK 0x1FFF
3306#define ICH_FLASH_LINEAR_ADDR_MASK 0x00FFFFFF 3035#define ICH_FLASH_LINEAR_ADDR_MASK 0x00FFFFFF
3307 3036
3308/* ICH8 GbE Flash Hardware Sequencing Flash Status Register bit breakdown */
3309/* Offset 04h HSFSTS */
3310union ich8_hws_flash_status {
3311 struct ich8_hsfsts {
3312#ifdef __BIG_ENDIAN
3313 u16 reserved2 :6;
3314 u16 fldesvalid :1;
3315 u16 flockdn :1;
3316 u16 flcdone :1;
3317 u16 flcerr :1;
3318 u16 dael :1;
3319 u16 berasesz :2;
3320 u16 flcinprog :1;
3321 u16 reserved1 :2;
3322#else
3323 u16 flcdone :1; /* bit 0 Flash Cycle Done */
3324 u16 flcerr :1; /* bit 1 Flash Cycle Error */
3325 u16 dael :1; /* bit 2 Direct Access error Log */
3326 u16 berasesz :2; /* bit 4:3 Block/Sector Erase Size */
3327 u16 flcinprog :1; /* bit 5 flash SPI cycle in Progress */
3328 u16 reserved1 :2; /* bit 13:6 Reserved */
3329 u16 reserved2 :6; /* bit 13:6 Reserved */
3330 u16 fldesvalid :1; /* bit 14 Flash Descriptor Valid */
3331 u16 flockdn :1; /* bit 15 Flash Configuration Lock-Down */
3332#endif
3333 } hsf_status;
3334 u16 regval;
3335};
3336
3337/* ICH8 GbE Flash Hardware Sequencing Flash control Register bit breakdown */
3338/* Offset 06h FLCTL */
3339union ich8_hws_flash_ctrl {
3340 struct ich8_hsflctl {
3341#ifdef __BIG_ENDIAN
3342 u16 fldbcount :2;
3343 u16 flockdn :6;
3344 u16 flcgo :1;
3345 u16 flcycle :2;
3346 u16 reserved :5;
3347#else
3348 u16 flcgo :1; /* 0 Flash Cycle Go */
3349 u16 flcycle :2; /* 2:1 Flash Cycle */
3350 u16 reserved :5; /* 7:3 Reserved */
3351 u16 fldbcount :2; /* 9:8 Flash Data Byte Count */
3352 u16 flockdn :6; /* 15:10 Reserved */
3353#endif
3354 } hsf_ctrl;
3355 u16 regval;
3356};
3357
3358/* ICH8 Flash Region Access Permissions */
3359union ich8_hws_flash_regacc {
3360 struct ich8_flracc {
3361#ifdef __BIG_ENDIAN
3362 u32 gmwag :8;
3363 u32 gmrag :8;
3364 u32 grwa :8;
3365 u32 grra :8;
3366#else
3367 u32 grra :8; /* 0:7 GbE region Read Access */
3368 u32 grwa :8; /* 8:15 GbE region Write Access */
3369 u32 gmrag :8; /* 23:16 GbE Master Read Access Grant */
3370 u32 gmwag :8; /* 31:24 GbE Master Write Access Grant */
3371#endif
3372 } hsf_flregacc;
3373 u16 regval;
3374};
3375
3376/* Miscellaneous PHY bit definitions. */ 3037/* Miscellaneous PHY bit definitions. */
3377#define PHY_PREAMBLE 0xFFFFFFFF 3038#define PHY_PREAMBLE 0xFFFFFFFF
3378#define PHY_SOF 0x01 3039#define PHY_SOF 0x01