diff options
Diffstat (limited to 'drivers/net/sky2.h')
-rw-r--r-- | drivers/net/sky2.h | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h index 1f56600aad86..a84584835ee1 100644 --- a/drivers/net/sky2.h +++ b/drivers/net/sky2.h | |||
@@ -32,6 +32,7 @@ enum pci_dev_reg_1 { | |||
32 | PCI_Y2_PHY1_COMA = 1<<28, /* Set PHY 1 to Coma Mode (YUKON-2) */ | 32 | PCI_Y2_PHY1_COMA = 1<<28, /* Set PHY 1 to Coma Mode (YUKON-2) */ |
33 | PCI_Y2_PHY2_POWD = 1<<27, /* Set PHY 2 to Power Down (YUKON-2) */ | 33 | PCI_Y2_PHY2_POWD = 1<<27, /* Set PHY 2 to Power Down (YUKON-2) */ |
34 | PCI_Y2_PHY1_POWD = 1<<26, /* Set PHY 1 to Power Down (YUKON-2) */ | 34 | PCI_Y2_PHY1_POWD = 1<<26, /* Set PHY 1 to Power Down (YUKON-2) */ |
35 | PCI_Y2_PME_LEGACY= 1<<15, /* PCI Express legacy power management mode */ | ||
35 | }; | 36 | }; |
36 | 37 | ||
37 | enum pci_dev_reg_2 { | 38 | enum pci_dev_reg_2 { |
@@ -837,33 +838,27 @@ enum { | |||
837 | GMAC_LINK_CTRL = 0x0f10,/* 16 bit Link Control Reg */ | 838 | GMAC_LINK_CTRL = 0x0f10,/* 16 bit Link Control Reg */ |
838 | 839 | ||
839 | /* Wake-up Frame Pattern Match Control Registers (YUKON only) */ | 840 | /* Wake-up Frame Pattern Match Control Registers (YUKON only) */ |
840 | |||
841 | WOL_REG_OFFS = 0x20,/* HW-Bug: Address is + 0x20 against spec. */ | ||
842 | |||
843 | WOL_CTRL_STAT = 0x0f20,/* 16 bit WOL Control/Status Reg */ | 841 | WOL_CTRL_STAT = 0x0f20,/* 16 bit WOL Control/Status Reg */ |
844 | WOL_MATCH_CTL = 0x0f22,/* 8 bit WOL Match Control Reg */ | 842 | WOL_MATCH_CTL = 0x0f22,/* 8 bit WOL Match Control Reg */ |
845 | WOL_MATCH_RES = 0x0f23,/* 8 bit WOL Match Result Reg */ | 843 | WOL_MATCH_RES = 0x0f23,/* 8 bit WOL Match Result Reg */ |
846 | WOL_MAC_ADDR = 0x0f24,/* 32 bit WOL MAC Address */ | 844 | WOL_MAC_ADDR = 0x0f24,/* 32 bit WOL MAC Address */ |
847 | WOL_PATT_PME = 0x0f2a,/* 8 bit WOL PME Match Enable (Yukon-2) */ | ||
848 | WOL_PATT_ASFM = 0x0f2b,/* 8 bit WOL ASF Match Enable (Yukon-2) */ | ||
849 | WOL_PATT_RPTR = 0x0f2c,/* 8 bit WOL Pattern Read Pointer */ | 845 | WOL_PATT_RPTR = 0x0f2c,/* 8 bit WOL Pattern Read Pointer */ |
850 | 846 | ||
851 | /* WOL Pattern Length Registers (YUKON only) */ | 847 | /* WOL Pattern Length Registers (YUKON only) */ |
852 | |||
853 | WOL_PATT_LEN_LO = 0x0f30,/* 32 bit WOL Pattern Length 3..0 */ | 848 | WOL_PATT_LEN_LO = 0x0f30,/* 32 bit WOL Pattern Length 3..0 */ |
854 | WOL_PATT_LEN_HI = 0x0f34,/* 24 bit WOL Pattern Length 6..4 */ | 849 | WOL_PATT_LEN_HI = 0x0f34,/* 24 bit WOL Pattern Length 6..4 */ |
855 | 850 | ||
856 | /* WOL Pattern Counter Registers (YUKON only) */ | 851 | /* WOL Pattern Counter Registers (YUKON only) */ |
857 | |||
858 | |||
859 | WOL_PATT_CNT_0 = 0x0f38,/* 32 bit WOL Pattern Counter 3..0 */ | 852 | WOL_PATT_CNT_0 = 0x0f38,/* 32 bit WOL Pattern Counter 3..0 */ |
860 | WOL_PATT_CNT_4 = 0x0f3c,/* 24 bit WOL Pattern Counter 6..4 */ | 853 | WOL_PATT_CNT_4 = 0x0f3c,/* 24 bit WOL Pattern Counter 6..4 */ |
861 | }; | 854 | }; |
855 | #define WOL_REGS(port, x) (x + (port)*0x80) | ||
862 | 856 | ||
863 | enum { | 857 | enum { |
864 | WOL_PATT_RAM_1 = 0x1000,/* WOL Pattern RAM Link 1 */ | 858 | WOL_PATT_RAM_1 = 0x1000,/* WOL Pattern RAM Link 1 */ |
865 | WOL_PATT_RAM_2 = 0x1400,/* WOL Pattern RAM Link 2 */ | 859 | WOL_PATT_RAM_2 = 0x1400,/* WOL Pattern RAM Link 2 */ |
866 | }; | 860 | }; |
861 | #define WOL_PATT_RAM_BASE(port) (WOL_PATT_RAM_1 + (port)*0x400) | ||
867 | 862 | ||
868 | enum { | 863 | enum { |
869 | BASE_GMAC_1 = 0x2800,/* GMAC 1 registers */ | 864 | BASE_GMAC_1 = 0x2800,/* GMAC 1 registers */ |
@@ -1715,14 +1710,17 @@ enum { | |||
1715 | GM_IS_RX_COMPL = 1<<0, /* Frame Reception Complete */ | 1710 | GM_IS_RX_COMPL = 1<<0, /* Frame Reception Complete */ |
1716 | 1711 | ||
1717 | #define GMAC_DEF_MSK GM_IS_TX_FF_UR | 1712 | #define GMAC_DEF_MSK GM_IS_TX_FF_UR |
1713 | }; | ||
1718 | 1714 | ||
1719 | /* GMAC_LINK_CTRL 16 bit GMAC Link Control Reg (YUKON only) */ | 1715 | /* GMAC_LINK_CTRL 16 bit GMAC Link Control Reg (YUKON only) */ |
1720 | /* Bits 15.. 2: reserved */ | 1716 | enum { /* Bits 15.. 2: reserved */ |
1721 | GMLC_RST_CLR = 1<<1, /* Clear GMAC Link Reset */ | 1717 | GMLC_RST_CLR = 1<<1, /* Clear GMAC Link Reset */ |
1722 | GMLC_RST_SET = 1<<0, /* Set GMAC Link Reset */ | 1718 | GMLC_RST_SET = 1<<0, /* Set GMAC Link Reset */ |
1719 | }; | ||
1723 | 1720 | ||
1724 | 1721 | ||
1725 | /* WOL_CTRL_STAT 16 bit WOL Control/Status Reg */ | 1722 | /* WOL_CTRL_STAT 16 bit WOL Control/Status Reg */ |
1723 | enum { | ||
1726 | WOL_CTL_LINK_CHG_OCC = 1<<15, | 1724 | WOL_CTL_LINK_CHG_OCC = 1<<15, |
1727 | WOL_CTL_MAGIC_PKT_OCC = 1<<14, | 1725 | WOL_CTL_MAGIC_PKT_OCC = 1<<14, |
1728 | WOL_CTL_PATTERN_OCC = 1<<13, | 1726 | WOL_CTL_PATTERN_OCC = 1<<13, |
@@ -1741,17 +1739,6 @@ enum { | |||
1741 | WOL_CTL_DIS_PATTERN_UNIT = 1<<0, | 1739 | WOL_CTL_DIS_PATTERN_UNIT = 1<<0, |
1742 | }; | 1740 | }; |
1743 | 1741 | ||
1744 | #define WOL_CTL_DEFAULT \ | ||
1745 | (WOL_CTL_DIS_PME_ON_LINK_CHG | \ | ||
1746 | WOL_CTL_DIS_PME_ON_PATTERN | \ | ||
1747 | WOL_CTL_DIS_PME_ON_MAGIC_PKT | \ | ||
1748 | WOL_CTL_DIS_LINK_CHG_UNIT | \ | ||
1749 | WOL_CTL_DIS_PATTERN_UNIT | \ | ||
1750 | WOL_CTL_DIS_MAGIC_PKT_UNIT) | ||
1751 | |||
1752 | /* WOL_MATCH_CTL 8 bit WOL Match Control Reg */ | ||
1753 | #define WOL_CTL_PATT_ENA(x) (1 << (x)) | ||
1754 | |||
1755 | 1742 | ||
1756 | /* Control flags */ | 1743 | /* Control flags */ |
1757 | enum { | 1744 | enum { |
@@ -1875,6 +1862,7 @@ struct sky2_port { | |||
1875 | u8 autoneg; /* AUTONEG_ENABLE, AUTONEG_DISABLE */ | 1862 | u8 autoneg; /* AUTONEG_ENABLE, AUTONEG_DISABLE */ |
1876 | u8 duplex; /* DUPLEX_HALF, DUPLEX_FULL */ | 1863 | u8 duplex; /* DUPLEX_HALF, DUPLEX_FULL */ |
1877 | u8 rx_csum; | 1864 | u8 rx_csum; |
1865 | u8 wol; | ||
1878 | enum flow_control flow_mode; | 1866 | enum flow_control flow_mode; |
1879 | enum flow_control flow_status; | 1867 | enum flow_control flow_status; |
1880 | 1868 | ||