diff options
Diffstat (limited to 'drivers/net/skge.h')
-rw-r--r-- | drivers/net/skge.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/net/skge.h b/drivers/net/skge.h index 36c62b68fab4..aad3aece30b5 100644 --- a/drivers/net/skge.h +++ b/drivers/net/skge.h | |||
@@ -537,7 +537,7 @@ enum { | |||
537 | 537 | ||
538 | /* Queue Register Offsets, use Q_ADDR() to access */ | 538 | /* Queue Register Offsets, use Q_ADDR() to access */ |
539 | enum { | 539 | enum { |
540 | B8_Q_REGS = 0x0400, /* base of Queue registers */ | 540 | B8_Q_REGS = 0x0400, /* base of Queue registers */ |
541 | Q_D = 0x00, /* 8*32 bit Current Descriptor */ | 541 | Q_D = 0x00, /* 8*32 bit Current Descriptor */ |
542 | Q_DA_L = 0x20, /* 32 bit Current Descriptor Address Low dWord */ | 542 | Q_DA_L = 0x20, /* 32 bit Current Descriptor Address Low dWord */ |
543 | Q_DA_H = 0x24, /* 32 bit Current Descriptor Address High dWord */ | 543 | Q_DA_H = 0x24, /* 32 bit Current Descriptor Address High dWord */ |
@@ -986,7 +986,7 @@ enum { | |||
986 | LINKLED_BLINK_OFF = 0x10, | 986 | LINKLED_BLINK_OFF = 0x10, |
987 | LINKLED_BLINK_ON = 0x20, | 987 | LINKLED_BLINK_ON = 0x20, |
988 | }; | 988 | }; |
989 | 989 | ||
990 | /* GMAC and GPHY Control Registers (YUKON only) */ | 990 | /* GMAC and GPHY Control Registers (YUKON only) */ |
991 | enum { | 991 | enum { |
992 | GMAC_CTRL = 0x0f00,/* 32 bit GMAC Control Reg */ | 992 | GMAC_CTRL = 0x0f00,/* 32 bit GMAC Control Reg */ |
@@ -1306,7 +1306,7 @@ enum { | |||
1306 | enum { | 1306 | enum { |
1307 | PHY_ANE_PAR_DF = 1<<4, /* Bit 4: Parallel Detection Fault */ | 1307 | PHY_ANE_PAR_DF = 1<<4, /* Bit 4: Parallel Detection Fault */ |
1308 | 1308 | ||
1309 | PHY_ANE_LP_CAP = 1<<0, /* Bit 0: Link Partner Auto-Neg. Cap. */ | 1309 | PHY_ANE_LP_CAP = 1<<0, /* Bit 0: Link Partner Auto-Neg. Cap. */ |
1310 | }; | 1310 | }; |
1311 | 1311 | ||
1312 | enum { | 1312 | enum { |
@@ -1718,7 +1718,7 @@ enum { | |||
1718 | PHY_M_PC_EN_DET_PLUS = 3<<8, /* Energy Detect Plus (Mode 2) */ | 1718 | PHY_M_PC_EN_DET_PLUS = 3<<8, /* Energy Detect Plus (Mode 2) */ |
1719 | }; | 1719 | }; |
1720 | 1720 | ||
1721 | #define PHY_M_PC_MDI_XMODE(x) (((x)<<5) & PHY_M_PC_MDIX_MSK) | 1721 | #define PHY_M_PC_MDI_XMODE(x) (((x)<<5) & PHY_M_PC_MDIX_MSK) |
1722 | 1722 | ||
1723 | enum { | 1723 | enum { |
1724 | PHY_M_PC_MAN_MDI = 0, /* 00 = Manual MDI configuration */ | 1724 | PHY_M_PC_MAN_MDI = 0, /* 00 = Manual MDI configuration */ |
@@ -2105,7 +2105,7 @@ enum { | |||
2105 | GM_GPSR_FC_RX_DIS = 1<<2, /* Bit 2: Rx Flow-Control Mode Disabled */ | 2105 | GM_GPSR_FC_RX_DIS = 1<<2, /* Bit 2: Rx Flow-Control Mode Disabled */ |
2106 | GM_GPSR_PROM_EN = 1<<1, /* Bit 1: Promiscuous Mode Enabled */ | 2106 | GM_GPSR_PROM_EN = 1<<1, /* Bit 1: Promiscuous Mode Enabled */ |
2107 | }; | 2107 | }; |
2108 | 2108 | ||
2109 | /* GM_GP_CTRL 16 bit r/w General Purpose Control Register */ | 2109 | /* GM_GP_CTRL 16 bit r/w General Purpose Control Register */ |
2110 | enum { | 2110 | enum { |
2111 | GM_GPCR_PROM_ENA = 1<<14, /* Bit 14: Enable Promiscuous Mode */ | 2111 | GM_GPCR_PROM_ENA = 1<<14, /* Bit 14: Enable Promiscuous Mode */ |
@@ -2127,7 +2127,7 @@ enum { | |||
2127 | 2127 | ||
2128 | #define GM_GPCR_SPEED_1000 (GM_GPCR_GIGS_ENA | GM_GPCR_SPEED_100) | 2128 | #define GM_GPCR_SPEED_1000 (GM_GPCR_GIGS_ENA | GM_GPCR_SPEED_100) |
2129 | #define GM_GPCR_AU_ALL_DIS (GM_GPCR_AU_DUP_DIS | GM_GPCR_AU_FCT_DIS|GM_GPCR_AU_SPD_DIS) | 2129 | #define GM_GPCR_AU_ALL_DIS (GM_GPCR_AU_DUP_DIS | GM_GPCR_AU_FCT_DIS|GM_GPCR_AU_SPD_DIS) |
2130 | 2130 | ||
2131 | /* GM_TX_CTRL 16 bit r/w Transmit Control Register */ | 2131 | /* GM_TX_CTRL 16 bit r/w Transmit Control Register */ |
2132 | enum { | 2132 | enum { |
2133 | GM_TXCR_FORCE_JAM = 1<<15, /* Bit 15: Force Jam / Flow-Control */ | 2133 | GM_TXCR_FORCE_JAM = 1<<15, /* Bit 15: Force Jam / Flow-Control */ |
@@ -2138,7 +2138,7 @@ enum { | |||
2138 | 2138 | ||
2139 | #define TX_COL_THR(x) (((x)<<10) & GM_TXCR_COL_THR_MSK) | 2139 | #define TX_COL_THR(x) (((x)<<10) & GM_TXCR_COL_THR_MSK) |
2140 | #define TX_COL_DEF 0x04 | 2140 | #define TX_COL_DEF 0x04 |
2141 | 2141 | ||
2142 | /* GM_RX_CTRL 16 bit r/w Receive Control Register */ | 2142 | /* GM_RX_CTRL 16 bit r/w Receive Control Register */ |
2143 | enum { | 2143 | enum { |
2144 | GM_RXCR_UCF_ENA = 1<<15, /* Bit 15: Enable Unicast filtering */ | 2144 | GM_RXCR_UCF_ENA = 1<<15, /* Bit 15: Enable Unicast filtering */ |
@@ -2146,7 +2146,7 @@ enum { | |||
2146 | GM_RXCR_CRC_DIS = 1<<13, /* Bit 13: Remove 4-byte CRC */ | 2146 | GM_RXCR_CRC_DIS = 1<<13, /* Bit 13: Remove 4-byte CRC */ |
2147 | GM_RXCR_PASS_FC = 1<<12, /* Bit 12: Pass FC packets to FIFO */ | 2147 | GM_RXCR_PASS_FC = 1<<12, /* Bit 12: Pass FC packets to FIFO */ |
2148 | }; | 2148 | }; |
2149 | 2149 | ||
2150 | /* GM_TX_PARAM 16 bit r/w Transmit Parameter Register */ | 2150 | /* GM_TX_PARAM 16 bit r/w Transmit Parameter Register */ |
2151 | enum { | 2151 | enum { |
2152 | GM_TXPA_JAMLEN_MSK = 0x03<<14, /* Bit 15..14: Jam Length */ | 2152 | GM_TXPA_JAMLEN_MSK = 0x03<<14, /* Bit 15..14: Jam Length */ |
@@ -2171,7 +2171,7 @@ enum { | |||
2171 | GM_SMOD_JUMBO_ENA = 1<<8, /* Bit 8: Enable Jumbo (Max. Frame Len) */ | 2171 | GM_SMOD_JUMBO_ENA = 1<<8, /* Bit 8: Enable Jumbo (Max. Frame Len) */ |
2172 | GM_SMOD_IPG_MSK = 0x1f /* Bit 4..0: Inter-Packet Gap (IPG) */ | 2172 | GM_SMOD_IPG_MSK = 0x1f /* Bit 4..0: Inter-Packet Gap (IPG) */ |
2173 | }; | 2173 | }; |
2174 | 2174 | ||
2175 | #define DATA_BLIND_VAL(x) (((x)<<11) & GM_SMOD_DATABL_MSK) | 2175 | #define DATA_BLIND_VAL(x) (((x)<<11) & GM_SMOD_DATABL_MSK) |
2176 | #define DATA_BLIND_DEF 0x04 | 2176 | #define DATA_BLIND_DEF 0x04 |
2177 | 2177 | ||
@@ -2186,7 +2186,7 @@ enum { | |||
2186 | GM_SMI_CT_RD_VAL = 1<<4, /* Bit 4: Read Valid (Read completed) */ | 2186 | GM_SMI_CT_RD_VAL = 1<<4, /* Bit 4: Read Valid (Read completed) */ |
2187 | GM_SMI_CT_BUSY = 1<<3, /* Bit 3: Busy (Operation in progress) */ | 2187 | GM_SMI_CT_BUSY = 1<<3, /* Bit 3: Busy (Operation in progress) */ |
2188 | }; | 2188 | }; |
2189 | 2189 | ||
2190 | #define GM_SMI_CT_PHY_AD(x) (((x)<<11) & GM_SMI_CT_PHY_A_MSK) | 2190 | #define GM_SMI_CT_PHY_AD(x) (((x)<<11) & GM_SMI_CT_PHY_A_MSK) |
2191 | #define GM_SMI_CT_REG_AD(x) (((x)<<6) & GM_SMI_CT_REG_A_MSK) | 2191 | #define GM_SMI_CT_REG_AD(x) (((x)<<6) & GM_SMI_CT_REG_A_MSK) |
2192 | 2192 | ||
@@ -2195,7 +2195,7 @@ enum { | |||
2195 | GM_PAR_MIB_CLR = 1<<5, /* Bit 5: Set MIB Clear Counter Mode */ | 2195 | GM_PAR_MIB_CLR = 1<<5, /* Bit 5: Set MIB Clear Counter Mode */ |
2196 | GM_PAR_MIB_TST = 1<<4, /* Bit 4: MIB Load Counter (Test Mode) */ | 2196 | GM_PAR_MIB_TST = 1<<4, /* Bit 4: MIB Load Counter (Test Mode) */ |
2197 | }; | 2197 | }; |
2198 | 2198 | ||
2199 | /* Receive Frame Status Encoding */ | 2199 | /* Receive Frame Status Encoding */ |
2200 | enum { | 2200 | enum { |
2201 | GMR_FS_LEN = 0xffff<<16, /* Bit 31..16: Rx Frame Length */ | 2201 | GMR_FS_LEN = 0xffff<<16, /* Bit 31..16: Rx Frame Length */ |
@@ -2217,12 +2217,12 @@ enum { | |||
2217 | /* | 2217 | /* |
2218 | * GMR_FS_ANY_ERR (analogous to XMR_FS_ANY_ERR) | 2218 | * GMR_FS_ANY_ERR (analogous to XMR_FS_ANY_ERR) |
2219 | */ | 2219 | */ |
2220 | GMR_FS_ANY_ERR = GMR_FS_CRC_ERR | GMR_FS_LONG_ERR | | 2220 | GMR_FS_ANY_ERR = GMR_FS_CRC_ERR | GMR_FS_LONG_ERR | |
2221 | GMR_FS_MII_ERR | GMR_FS_BAD_FC | GMR_FS_GOOD_FC | | 2221 | GMR_FS_MII_ERR | GMR_FS_BAD_FC | GMR_FS_GOOD_FC | |
2222 | GMR_FS_JABBER, | 2222 | GMR_FS_JABBER, |
2223 | /* Rx GMAC FIFO Flush Mask (default) */ | 2223 | /* Rx GMAC FIFO Flush Mask (default) */ |
2224 | RX_FF_FL_DEF_MSK = GMR_FS_CRC_ERR | GMR_FS_RX_FF_OV |GMR_FS_MII_ERR | | 2224 | RX_FF_FL_DEF_MSK = GMR_FS_CRC_ERR | GMR_FS_RX_FF_OV |GMR_FS_MII_ERR | |
2225 | GMR_FS_BAD_FC | GMR_FS_GOOD_FC | GMR_FS_UN_SIZE | | 2225 | GMR_FS_BAD_FC | GMR_FS_GOOD_FC | GMR_FS_UN_SIZE | |
2226 | GMR_FS_JABBER, | 2226 | GMR_FS_JABBER, |
2227 | }; | 2227 | }; |
2228 | 2228 | ||
@@ -2801,7 +2801,7 @@ struct skge_hw { | |||
2801 | 2801 | ||
2802 | u32 ram_size; | 2802 | u32 ram_size; |
2803 | u32 ram_offset; | 2803 | u32 ram_offset; |
2804 | 2804 | ||
2805 | struct tasklet_struct ext_tasklet; | 2805 | struct tasklet_struct ext_tasklet; |
2806 | spinlock_t phy_lock; | 2806 | spinlock_t phy_lock; |
2807 | }; | 2807 | }; |
@@ -2827,7 +2827,7 @@ enum { | |||
2827 | FLOW_MODE_REM_SEND = 2, /* Symmetric or just remote */ | 2827 | FLOW_MODE_REM_SEND = 2, /* Symmetric or just remote */ |
2828 | FLOW_MODE_SYMMETRIC = 3, /* Both stations may send PAUSE */ | 2828 | FLOW_MODE_SYMMETRIC = 3, /* Both stations may send PAUSE */ |
2829 | }; | 2829 | }; |
2830 | 2830 | ||
2831 | struct skge_port { | 2831 | struct skge_port { |
2832 | u32 msg_enable; | 2832 | u32 msg_enable; |
2833 | struct skge_hw *hw; | 2833 | struct skge_hw *hw; |
@@ -2933,24 +2933,24 @@ static inline void skge_xm_write8(const struct skge_hw *hw, int port, int r, u8 | |||
2933 | static inline void skge_xm_outhash(const struct skge_hw *hw, int port, int reg, | 2933 | static inline void skge_xm_outhash(const struct skge_hw *hw, int port, int reg, |
2934 | const u8 *hash) | 2934 | const u8 *hash) |
2935 | { | 2935 | { |
2936 | skge_xm_write16(hw, port, reg, | 2936 | skge_xm_write16(hw, port, reg, |
2937 | (u16)hash[0] | ((u16)hash[1] << 8)); | 2937 | (u16)hash[0] | ((u16)hash[1] << 8)); |
2938 | skge_xm_write16(hw, port, reg+2, | 2938 | skge_xm_write16(hw, port, reg+2, |
2939 | (u16)hash[2] | ((u16)hash[3] << 8)); | 2939 | (u16)hash[2] | ((u16)hash[3] << 8)); |
2940 | skge_xm_write16(hw, port, reg+4, | 2940 | skge_xm_write16(hw, port, reg+4, |
2941 | (u16)hash[4] | ((u16)hash[5] << 8)); | 2941 | (u16)hash[4] | ((u16)hash[5] << 8)); |
2942 | skge_xm_write16(hw, port, reg+6, | 2942 | skge_xm_write16(hw, port, reg+6, |
2943 | (u16)hash[6] | ((u16)hash[7] << 8)); | 2943 | (u16)hash[6] | ((u16)hash[7] << 8)); |
2944 | } | 2944 | } |
2945 | 2945 | ||
2946 | static inline void skge_xm_outaddr(const struct skge_hw *hw, int port, int reg, | 2946 | static inline void skge_xm_outaddr(const struct skge_hw *hw, int port, int reg, |
2947 | const u8 *addr) | 2947 | const u8 *addr) |
2948 | { | 2948 | { |
2949 | skge_xm_write16(hw, port, reg, | 2949 | skge_xm_write16(hw, port, reg, |
2950 | (u16)addr[0] | ((u16)addr[1] << 8)); | 2950 | (u16)addr[0] | ((u16)addr[1] << 8)); |
2951 | skge_xm_write16(hw, port, reg, | 2951 | skge_xm_write16(hw, port, reg, |
2952 | (u16)addr[2] | ((u16)addr[3] << 8)); | 2952 | (u16)addr[2] | ((u16)addr[3] << 8)); |
2953 | skge_xm_write16(hw, port, reg, | 2953 | skge_xm_write16(hw, port, reg, |
2954 | (u16)addr[4] | ((u16)addr[5] << 8)); | 2954 | (u16)addr[4] | ((u16)addr[5] << 8)); |
2955 | } | 2955 | } |
2956 | 2956 | ||
@@ -3001,5 +3001,5 @@ static inline void skge_gm_set_addr(struct skge_hw *hw, int port, int reg, | |||
3001 | skge_gma_write16(hw, port, reg+8, | 3001 | skge_gma_write16(hw, port, reg+8, |
3002 | (u16) addr[4] | ((u16) addr[5] << 8)); | 3002 | (u16) addr[4] | ((u16) addr[5] << 8)); |
3003 | } | 3003 | } |
3004 | 3004 | ||
3005 | #endif | 3005 | #endif |