diff options
Diffstat (limited to 'drivers/net/e1000/e1000_hw.h')
-rw-r--r-- | drivers/net/e1000/e1000_hw.h | 59 |
1 files changed, 56 insertions, 3 deletions
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h index ecd9f6c6bcd5..f5514a0d5be6 100644 --- a/drivers/net/e1000/e1000_hw.h +++ b/drivers/net/e1000/e1000_hw.h | |||
@@ -52,6 +52,7 @@ typedef enum { | |||
52 | e1000_82545, | 52 | e1000_82545, |
53 | e1000_82545_rev_3, | 53 | e1000_82545_rev_3, |
54 | e1000_82546, | 54 | e1000_82546, |
55 | e1000_ce4100, | ||
55 | e1000_82546_rev_3, | 56 | e1000_82546_rev_3, |
56 | e1000_82541, | 57 | e1000_82541, |
57 | e1000_82541_rev_2, | 58 | e1000_82541_rev_2, |
@@ -209,9 +210,11 @@ typedef enum { | |||
209 | } e1000_1000t_rx_status; | 210 | } e1000_1000t_rx_status; |
210 | 211 | ||
211 | typedef enum { | 212 | typedef enum { |
212 | e1000_phy_m88 = 0, | 213 | e1000_phy_m88 = 0, |
213 | e1000_phy_igp, | 214 | e1000_phy_igp, |
214 | e1000_phy_undefined = 0xFF | 215 | e1000_phy_8211, |
216 | e1000_phy_8201, | ||
217 | e1000_phy_undefined = 0xFF | ||
215 | } e1000_phy_type; | 218 | } e1000_phy_type; |
216 | 219 | ||
217 | typedef enum { | 220 | typedef enum { |
@@ -442,6 +445,7 @@ void e1000_io_write(struct e1000_hw *hw, unsigned long port, u32 value); | |||
442 | #define E1000_DEV_ID_82547EI 0x1019 | 445 | #define E1000_DEV_ID_82547EI 0x1019 |
443 | #define E1000_DEV_ID_82547EI_MOBILE 0x101A | 446 | #define E1000_DEV_ID_82547EI_MOBILE 0x101A |
444 | #define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 | 447 | #define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 |
448 | #define E1000_DEV_ID_INTEL_CE4100_GBE 0x2E6E | ||
445 | 449 | ||
446 | #define NODE_ADDRESS_SIZE 6 | 450 | #define NODE_ADDRESS_SIZE 6 |
447 | #define ETH_LENGTH_OF_ADDRESS 6 | 451 | #define ETH_LENGTH_OF_ADDRESS 6 |
@@ -808,6 +812,16 @@ struct e1000_ffvt_entry { | |||
808 | #define E1000_CTRL_EXT 0x00018 /* Extended Device Control - RW */ | 812 | #define E1000_CTRL_EXT 0x00018 /* Extended Device Control - RW */ |
809 | #define E1000_FLA 0x0001C /* Flash Access - RW */ | 813 | #define E1000_FLA 0x0001C /* Flash Access - RW */ |
810 | #define E1000_MDIC 0x00020 /* MDI Control - RW */ | 814 | #define E1000_MDIC 0x00020 /* MDI Control - RW */ |
815 | |||
816 | extern void __iomem *ce4100_gbe_mdio_base_virt; | ||
817 | #define INTEL_CE_GBE_MDIO_RCOMP_BASE (ce4100_gbe_mdio_base_virt) | ||
818 | #define E1000_MDIO_STS (INTEL_CE_GBE_MDIO_RCOMP_BASE + 0) | ||
819 | #define E1000_MDIO_CMD (INTEL_CE_GBE_MDIO_RCOMP_BASE + 4) | ||
820 | #define E1000_MDIO_DRV (INTEL_CE_GBE_MDIO_RCOMP_BASE + 8) | ||
821 | #define E1000_MDC_CMD (INTEL_CE_GBE_MDIO_RCOMP_BASE + 0xC) | ||
822 | #define E1000_RCOMP_CTL (INTEL_CE_GBE_MDIO_RCOMP_BASE + 0x20) | ||
823 | #define E1000_RCOMP_STS (INTEL_CE_GBE_MDIO_RCOMP_BASE + 0x24) | ||
824 | |||
811 | #define E1000_SCTL 0x00024 /* SerDes Control - RW */ | 825 | #define E1000_SCTL 0x00024 /* SerDes Control - RW */ |
812 | #define E1000_FEXTNVM 0x00028 /* Future Extended NVM register */ | 826 | #define E1000_FEXTNVM 0x00028 /* Future Extended NVM register */ |
813 | #define E1000_FCAL 0x00028 /* Flow Control Address Low - RW */ | 827 | #define E1000_FCAL 0x00028 /* Flow Control Address Low - RW */ |
@@ -820,6 +834,34 @@ struct e1000_ffvt_entry { | |||
820 | #define E1000_IMS 0x000D0 /* Interrupt Mask Set - RW */ | 834 | #define E1000_IMS 0x000D0 /* Interrupt Mask Set - RW */ |
821 | #define E1000_IMC 0x000D8 /* Interrupt Mask Clear - WO */ | 835 | #define E1000_IMC 0x000D8 /* Interrupt Mask Clear - WO */ |
822 | #define E1000_IAM 0x000E0 /* Interrupt Acknowledge Auto Mask */ | 836 | #define E1000_IAM 0x000E0 /* Interrupt Acknowledge Auto Mask */ |
837 | |||
838 | /* Auxiliary Control Register. This register is CE4100 specific, | ||
839 | * RMII/RGMII function is switched by this register - RW | ||
840 | * Following are bits definitions of the Auxiliary Control Register | ||
841 | */ | ||
842 | #define E1000_CTL_AUX 0x000E0 | ||
843 | #define E1000_CTL_AUX_END_SEL_SHIFT 10 | ||
844 | #define E1000_CTL_AUX_ENDIANESS_SHIFT 8 | ||
845 | #define E1000_CTL_AUX_RGMII_RMII_SHIFT 0 | ||
846 | |||
847 | /* descriptor and packet transfer use CTL_AUX.ENDIANESS */ | ||
848 | #define E1000_CTL_AUX_DES_PKT (0x0 << E1000_CTL_AUX_END_SEL_SHIFT) | ||
849 | /* descriptor use CTL_AUX.ENDIANESS, packet use default */ | ||
850 | #define E1000_CTL_AUX_DES (0x1 << E1000_CTL_AUX_END_SEL_SHIFT) | ||
851 | /* descriptor use default, packet use CTL_AUX.ENDIANESS */ | ||
852 | #define E1000_CTL_AUX_PKT (0x2 << E1000_CTL_AUX_END_SEL_SHIFT) | ||
853 | /* all use CTL_AUX.ENDIANESS */ | ||
854 | #define E1000_CTL_AUX_ALL (0x3 << E1000_CTL_AUX_END_SEL_SHIFT) | ||
855 | |||
856 | #define E1000_CTL_AUX_RGMII (0x0 << E1000_CTL_AUX_RGMII_RMII_SHIFT) | ||
857 | #define E1000_CTL_AUX_RMII (0x1 << E1000_CTL_AUX_RGMII_RMII_SHIFT) | ||
858 | |||
859 | /* LW little endian, Byte big endian */ | ||
860 | #define E1000_CTL_AUX_LWLE_BBE (0x0 << E1000_CTL_AUX_ENDIANESS_SHIFT) | ||
861 | #define E1000_CTL_AUX_LWLE_BLE (0x1 << E1000_CTL_AUX_ENDIANESS_SHIFT) | ||
862 | #define E1000_CTL_AUX_LWBE_BBE (0x2 << E1000_CTL_AUX_ENDIANESS_SHIFT) | ||
863 | #define E1000_CTL_AUX_LWBE_BLE (0x3 << E1000_CTL_AUX_ENDIANESS_SHIFT) | ||
864 | |||
823 | #define E1000_RCTL 0x00100 /* RX Control - RW */ | 865 | #define E1000_RCTL 0x00100 /* RX Control - RW */ |
824 | #define E1000_RDTR1 0x02820 /* RX Delay Timer (1) - RW */ | 866 | #define E1000_RDTR1 0x02820 /* RX Delay Timer (1) - RW */ |
825 | #define E1000_RDBAL1 0x02900 /* RX Descriptor Base Address Low (1) - RW */ | 867 | #define E1000_RDBAL1 0x02900 /* RX Descriptor Base Address Low (1) - RW */ |
@@ -1011,6 +1053,7 @@ struct e1000_ffvt_entry { | |||
1011 | * in more current versions of the 8254x. Despite the difference in location, | 1053 | * in more current versions of the 8254x. Despite the difference in location, |
1012 | * the registers function in the same manner. | 1054 | * the registers function in the same manner. |
1013 | */ | 1055 | */ |
1056 | #define E1000_82542_CTL_AUX E1000_CTL_AUX | ||
1014 | #define E1000_82542_CTRL E1000_CTRL | 1057 | #define E1000_82542_CTRL E1000_CTRL |
1015 | #define E1000_82542_CTRL_DUP E1000_CTRL_DUP | 1058 | #define E1000_82542_CTRL_DUP E1000_CTRL_DUP |
1016 | #define E1000_82542_STATUS E1000_STATUS | 1059 | #define E1000_82542_STATUS E1000_STATUS |
@@ -1571,6 +1614,11 @@ struct e1000_hw { | |||
1571 | #define E1000_MDIC_INT_EN 0x20000000 | 1614 | #define E1000_MDIC_INT_EN 0x20000000 |
1572 | #define E1000_MDIC_ERROR 0x40000000 | 1615 | #define E1000_MDIC_ERROR 0x40000000 |
1573 | 1616 | ||
1617 | #define INTEL_CE_GBE_MDIC_OP_WRITE 0x04000000 | ||
1618 | #define INTEL_CE_GBE_MDIC_OP_READ 0x00000000 | ||
1619 | #define INTEL_CE_GBE_MDIC_GO 0x80000000 | ||
1620 | #define INTEL_CE_GBE_MDIC_READ_ERROR 0x80000000 | ||
1621 | |||
1574 | #define E1000_KUMCTRLSTA_MASK 0x0000FFFF | 1622 | #define E1000_KUMCTRLSTA_MASK 0x0000FFFF |
1575 | #define E1000_KUMCTRLSTA_OFFSET 0x001F0000 | 1623 | #define E1000_KUMCTRLSTA_OFFSET 0x001F0000 |
1576 | #define E1000_KUMCTRLSTA_OFFSET_SHIFT 16 | 1624 | #define E1000_KUMCTRLSTA_OFFSET_SHIFT 16 |
@@ -2871,6 +2919,11 @@ struct e1000_host_command_info { | |||
2871 | #define M88E1111_I_PHY_ID 0x01410CC0 | 2919 | #define M88E1111_I_PHY_ID 0x01410CC0 |
2872 | #define L1LXT971A_PHY_ID 0x001378E0 | 2920 | #define L1LXT971A_PHY_ID 0x001378E0 |
2873 | 2921 | ||
2922 | #define RTL8211B_PHY_ID 0x001CC910 | ||
2923 | #define RTL8201N_PHY_ID 0x8200 | ||
2924 | #define RTL_PHY_CTRL_FD 0x0100 /* Full duplex.0=half; 1=full */ | ||
2925 | #define RTL_PHY_CTRL_SPD_100 0x200000 /* Force 100Mb */ | ||
2926 | |||
2874 | /* Bits... | 2927 | /* Bits... |
2875 | * 15-5: page | 2928 | * 15-5: page |
2876 | * 4-0: register offset | 2929 | * 4-0: register offset |