diff options
Diffstat (limited to 'drivers/net/sky2.h')
-rw-r--r-- | drivers/net/sky2.h | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h index 7760545edbf2..6ed1d47dbbd3 100644 --- a/drivers/net/sky2.h +++ b/drivers/net/sky2.h | |||
@@ -608,7 +608,7 @@ enum { | |||
608 | PHY_ADDR_MARV = 0, | 608 | PHY_ADDR_MARV = 0, |
609 | }; | 609 | }; |
610 | 610 | ||
611 | #define RB_ADDR(offs, queue) (B16_RAM_REGS + (queue) + (offs)) | 611 | #define RB_ADDR(offs, queue) ((u16) B16_RAM_REGS + (queue) + (offs)) |
612 | 612 | ||
613 | 613 | ||
614 | enum { | 614 | enum { |
@@ -680,6 +680,7 @@ enum { | |||
680 | BMU_FIFO_ENA | BMU_OP_ON, | 680 | BMU_FIFO_ENA | BMU_OP_ON, |
681 | 681 | ||
682 | BMU_WM_DEFAULT = 0x600, | 682 | BMU_WM_DEFAULT = 0x600, |
683 | BMU_WM_PEX = 0x80, | ||
683 | }; | 684 | }; |
684 | 685 | ||
685 | /* Tx BMU Control / Status Registers (Yukon-2) */ | 686 | /* Tx BMU Control / Status Registers (Yukon-2) */ |
@@ -1060,7 +1061,7 @@ enum { | |||
1060 | PHY_M_PC_EN_DET_PLUS = 3<<8, /* Energy Detect Plus (Mode 2) */ | 1061 | PHY_M_PC_EN_DET_PLUS = 3<<8, /* Energy Detect Plus (Mode 2) */ |
1061 | }; | 1062 | }; |
1062 | 1063 | ||
1063 | #define PHY_M_PC_MDI_XMODE(x) (((x)<<5) & PHY_M_PC_MDIX_MSK) | 1064 | #define PHY_M_PC_MDI_XMODE(x) (((u16)(x)<<5) & PHY_M_PC_MDIX_MSK) |
1064 | 1065 | ||
1065 | enum { | 1066 | enum { |
1066 | PHY_M_PC_MAN_MDI = 0, /* 00 = Manual MDI configuration */ | 1067 | PHY_M_PC_MAN_MDI = 0, /* 00 = Manual MDI configuration */ |
@@ -1156,13 +1157,13 @@ enum { | |||
1156 | PHY_M_EC_TX_TIM_CT = 1<<1, /* RGMII Tx Timing Control */ | 1157 | PHY_M_EC_TX_TIM_CT = 1<<1, /* RGMII Tx Timing Control */ |
1157 | PHY_M_EC_TRANS_DIS = 1<<0, /* Transmitter Disable (88E1111 only) */}; | 1158 | PHY_M_EC_TRANS_DIS = 1<<0, /* Transmitter Disable (88E1111 only) */}; |
1158 | 1159 | ||
1159 | #define PHY_M_EC_M_DSC(x) ((x)<<10 & PHY_M_EC_M_DSC_MSK) | 1160 | #define PHY_M_EC_M_DSC(x) ((u16)(x)<<10 & PHY_M_EC_M_DSC_MSK) |
1160 | /* 00=1x; 01=2x; 10=3x; 11=4x */ | 1161 | /* 00=1x; 01=2x; 10=3x; 11=4x */ |
1161 | #define PHY_M_EC_S_DSC(x) ((x)<<8 & PHY_M_EC_S_DSC_MSK) | 1162 | #define PHY_M_EC_S_DSC(x) ((u16)(x)<<8 & PHY_M_EC_S_DSC_MSK) |
1162 | /* 00=dis; 01=1x; 10=2x; 11=3x */ | 1163 | /* 00=dis; 01=1x; 10=2x; 11=3x */ |
1163 | #define PHY_M_EC_DSC_2(x) ((x)<<9 & PHY_M_EC_M_DSC_MSK2) | 1164 | #define PHY_M_EC_DSC_2(x) ((u16)(x)<<9 & PHY_M_EC_M_DSC_MSK2) |
1164 | /* 000=1x; 001=2x; 010=3x; 011=4x */ | 1165 | /* 000=1x; 001=2x; 010=3x; 011=4x */ |
1165 | #define PHY_M_EC_MAC_S(x) ((x)<<4 & PHY_M_EC_MAC_S_MSK) | 1166 | #define PHY_M_EC_MAC_S(x) ((u16)(x)<<4 & PHY_M_EC_MAC_S_MSK) |
1166 | /* 01X=0; 110=2.5; 111=25 (MHz) */ | 1167 | /* 01X=0; 110=2.5; 111=25 (MHz) */ |
1167 | 1168 | ||
1168 | /* for Yukon-2 Gigabit Ethernet PHY (88E1112 only) */ | 1169 | /* for Yukon-2 Gigabit Ethernet PHY (88E1112 only) */ |
@@ -1173,7 +1174,7 @@ enum { | |||
1173 | }; | 1174 | }; |
1174 | /* !!! Errata in spec. (1 = disable) */ | 1175 | /* !!! Errata in spec. (1 = disable) */ |
1175 | 1176 | ||
1176 | #define PHY_M_PC_DSC(x) (((x)<<12) & PHY_M_PC_DSC_MSK) | 1177 | #define PHY_M_PC_DSC(x) (((u16)(x)<<12) & PHY_M_PC_DSC_MSK) |
1177 | /* 100=5x; 101=6x; 110=7x; 111=8x */ | 1178 | /* 100=5x; 101=6x; 110=7x; 111=8x */ |
1178 | enum { | 1179 | enum { |
1179 | MAC_TX_CLK_0_MHZ = 2, | 1180 | MAC_TX_CLK_0_MHZ = 2, |
@@ -1203,7 +1204,7 @@ enum { | |||
1203 | PHY_M_LEDC_TX_C_MSB = 1<<0, /* Tx Control (MSB, 88E1111 only) */ | 1204 | PHY_M_LEDC_TX_C_MSB = 1<<0, /* Tx Control (MSB, 88E1111 only) */ |
1204 | }; | 1205 | }; |
1205 | 1206 | ||
1206 | #define PHY_M_LED_PULS_DUR(x) (((x)<<12) & PHY_M_LEDC_PULS_MSK) | 1207 | #define PHY_M_LED_PULS_DUR(x) (((u16)(x)<<12) & PHY_M_LEDC_PULS_MSK) |
1207 | 1208 | ||
1208 | /***** PHY_MARV_PHY_STAT (page 3)16 bit r/w Polarity Control Reg. *****/ | 1209 | /***** PHY_MARV_PHY_STAT (page 3)16 bit r/w Polarity Control Reg. *****/ |
1209 | enum { | 1210 | enum { |
@@ -1233,7 +1234,7 @@ enum { | |||
1233 | PULS_1300MS = 7,/* 1.3 s to 2.7 s */ | 1234 | PULS_1300MS = 7,/* 1.3 s to 2.7 s */ |
1234 | }; | 1235 | }; |
1235 | 1236 | ||
1236 | #define PHY_M_LED_BLINK_RT(x) (((x)<<8) & PHY_M_LEDC_BL_R_MSK) | 1237 | #define PHY_M_LED_BLINK_RT(x) (((u16)(x)<<8) & PHY_M_LEDC_BL_R_MSK) |
1237 | 1238 | ||
1238 | enum { | 1239 | enum { |
1239 | BLINK_42MS = 0,/* 42 ms */ | 1240 | BLINK_42MS = 0,/* 42 ms */ |
@@ -1243,21 +1244,18 @@ enum { | |||
1243 | BLINK_670MS = 4,/* 670 ms */ | 1244 | BLINK_670MS = 4,/* 670 ms */ |
1244 | }; | 1245 | }; |
1245 | 1246 | ||
1246 | /***** PHY_MARV_LED_OVER 16 bit r/w Manual LED Override Reg *****/ | 1247 | /**** PHY_MARV_LED_OVER 16 bit r/w LED control */ |
1247 | #define PHY_M_LED_MO_SGMII(x) ((x)<<14) /* Bit 15..14: SGMII AN Timer */ | ||
1248 | /* Bit 13..12: reserved */ | ||
1249 | #define PHY_M_LED_MO_DUP(x) ((x)<<10) /* Bit 11..10: Duplex */ | ||
1250 | #define PHY_M_LED_MO_10(x) ((x)<<8) /* Bit 9.. 8: Link 10 */ | ||
1251 | #define PHY_M_LED_MO_100(x) ((x)<<6) /* Bit 7.. 6: Link 100 */ | ||
1252 | #define PHY_M_LED_MO_1000(x) ((x)<<4) /* Bit 5.. 4: Link 1000 */ | ||
1253 | #define PHY_M_LED_MO_RX(x) ((x)<<2) /* Bit 3.. 2: Rx */ | ||
1254 | #define PHY_M_LED_MO_TX(x) ((x)<<0) /* Bit 1.. 0: Tx */ | ||
1255 | |||
1256 | enum { | 1248 | enum { |
1257 | MO_LED_NORM = 0, | 1249 | PHY_M_LED_MO_DUP = 3<<10,/* Bit 11..10: Duplex */ |
1258 | MO_LED_BLINK = 1, | 1250 | PHY_M_LED_MO_10 = 3<<8, /* Bit 9.. 8: Link 10 */ |
1259 | MO_LED_OFF = 2, | 1251 | PHY_M_LED_MO_100 = 3<<6, /* Bit 7.. 6: Link 100 */ |
1260 | MO_LED_ON = 3, | 1252 | PHY_M_LED_MO_1000 = 3<<4, /* Bit 5.. 4: Link 1000 */ |
1253 | PHY_M_LED_MO_RX = 3<<2, /* Bit 3.. 2: Rx */ | ||
1254 | PHY_M_LED_MO_TX = 3<<0, /* Bit 1.. 0: Tx */ | ||
1255 | |||
1256 | PHY_M_LED_ALL = PHY_M_LED_MO_DUP | PHY_M_LED_MO_10 | ||
1257 | | PHY_M_LED_MO_100 | PHY_M_LED_MO_1000 | ||
1258 | | PHY_M_LED_MO_RX, | ||
1261 | }; | 1259 | }; |
1262 | 1260 | ||
1263 | /***** PHY_MARV_EXT_CTRL_2 16 bit r/w Ext. PHY Specific Ctrl 2 *****/ | 1261 | /***** PHY_MARV_EXT_CTRL_2 16 bit r/w Ext. PHY Specific Ctrl 2 *****/ |
@@ -1294,9 +1292,9 @@ enum { | |||
1294 | PHY_M_FELP_LED0_MSK = 0xf, /* Bit 3.. 0: LED0 Mask (SPEED) */ | 1292 | PHY_M_FELP_LED0_MSK = 0xf, /* Bit 3.. 0: LED0 Mask (SPEED) */ |
1295 | }; | 1293 | }; |
1296 | 1294 | ||
1297 | #define PHY_M_FELP_LED2_CTRL(x) (((x)<<8) & PHY_M_FELP_LED2_MSK) | 1295 | #define PHY_M_FELP_LED2_CTRL(x) (((u16)(x)<<8) & PHY_M_FELP_LED2_MSK) |
1298 | #define PHY_M_FELP_LED1_CTRL(x) (((x)<<4) & PHY_M_FELP_LED1_MSK) | 1296 | #define PHY_M_FELP_LED1_CTRL(x) (((u16)(x)<<4) & PHY_M_FELP_LED1_MSK) |
1299 | #define PHY_M_FELP_LED0_CTRL(x) (((x)<<0) & PHY_M_FELP_LED0_MSK) | 1297 | #define PHY_M_FELP_LED0_CTRL(x) (((u16)(x)<<0) & PHY_M_FELP_LED0_MSK) |
1300 | 1298 | ||
1301 | enum { | 1299 | enum { |
1302 | LED_PAR_CTRL_COLX = 0x00, | 1300 | LED_PAR_CTRL_COLX = 0x00, |
@@ -1552,8 +1550,8 @@ enum { | |||
1552 | GM_SMI_CT_BUSY = 1<<3, /* Bit 3: Busy (Operation in progress) */ | 1550 | GM_SMI_CT_BUSY = 1<<3, /* Bit 3: Busy (Operation in progress) */ |
1553 | }; | 1551 | }; |
1554 | 1552 | ||
1555 | #define GM_SMI_CT_PHY_AD(x) (((x)<<11) & GM_SMI_CT_PHY_A_MSK) | 1553 | #define GM_SMI_CT_PHY_AD(x) (((u16)(x)<<11) & GM_SMI_CT_PHY_A_MSK) |
1556 | #define GM_SMI_CT_REG_AD(x) (((x)<<6) & GM_SMI_CT_REG_A_MSK) | 1554 | #define GM_SMI_CT_REG_AD(x) (((u16)(x)<<6) & GM_SMI_CT_REG_A_MSK) |
1557 | 1555 | ||
1558 | /* GM_PHY_ADDR 16 bit r/w GPHY Address Register */ | 1556 | /* GM_PHY_ADDR 16 bit r/w GPHY Address Register */ |
1559 | enum { | 1557 | enum { |