aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sky2.h')
-rw-r--r--drivers/net/sky2.h53
1 files changed, 25 insertions, 28 deletions
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index a63f6057b2ea..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
614enum { 614enum {
@@ -1061,7 +1061,7 @@ enum {
1061 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) */
1062}; 1062};
1063 1063
1064#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)
1065 1065
1066enum { 1066enum {
1067 PHY_M_PC_MAN_MDI = 0, /* 00 = Manual MDI configuration */ 1067 PHY_M_PC_MAN_MDI = 0, /* 00 = Manual MDI configuration */
@@ -1157,13 +1157,13 @@ enum {
1157 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 */
1158 PHY_M_EC_TRANS_DIS = 1<<0, /* Transmitter Disable (88E1111 only) */}; 1158 PHY_M_EC_TRANS_DIS = 1<<0, /* Transmitter Disable (88E1111 only) */};
1159 1159
1160#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)
1161 /* 00=1x; 01=2x; 10=3x; 11=4x */ 1161 /* 00=1x; 01=2x; 10=3x; 11=4x */
1162#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)
1163 /* 00=dis; 01=1x; 10=2x; 11=3x */ 1163 /* 00=dis; 01=1x; 10=2x; 11=3x */
1164#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)
1165 /* 000=1x; 001=2x; 010=3x; 011=4x */ 1165 /* 000=1x; 001=2x; 010=3x; 011=4x */
1166#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)
1167 /* 01X=0; 110=2.5; 111=25 (MHz) */ 1167 /* 01X=0; 110=2.5; 111=25 (MHz) */
1168 1168
1169/* for Yukon-2 Gigabit Ethernet PHY (88E1112 only) */ 1169/* for Yukon-2 Gigabit Ethernet PHY (88E1112 only) */
@@ -1174,7 +1174,7 @@ enum {
1174}; 1174};
1175/* !!! Errata in spec. (1 = disable) */ 1175/* !!! Errata in spec. (1 = disable) */
1176 1176
1177#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)
1178 /* 100=5x; 101=6x; 110=7x; 111=8x */ 1178 /* 100=5x; 101=6x; 110=7x; 111=8x */
1179enum { 1179enum {
1180 MAC_TX_CLK_0_MHZ = 2, 1180 MAC_TX_CLK_0_MHZ = 2,
@@ -1204,7 +1204,7 @@ enum {
1204 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) */
1205}; 1205};
1206 1206
1207#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)
1208 1208
1209/***** 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. *****/
1210enum { 1210enum {
@@ -1234,7 +1234,7 @@ enum {
1234 PULS_1300MS = 7,/* 1.3 s to 2.7 s */ 1234 PULS_1300MS = 7,/* 1.3 s to 2.7 s */
1235}; 1235};
1236 1236
1237#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)
1238 1238
1239enum { 1239enum {
1240 BLINK_42MS = 0,/* 42 ms */ 1240 BLINK_42MS = 0,/* 42 ms */
@@ -1244,21 +1244,18 @@ enum {
1244 BLINK_670MS = 4,/* 670 ms */ 1244 BLINK_670MS = 4,/* 670 ms */
1245}; 1245};
1246 1246
1247/***** PHY_MARV_LED_OVER 16 bit r/w Manual LED Override Reg *****/ 1247/**** PHY_MARV_LED_OVER 16 bit r/w LED control */
1248#define PHY_M_LED_MO_SGMII(x) ((x)<<14) /* Bit 15..14: SGMII AN Timer */
1249 /* Bit 13..12: reserved */
1250#define PHY_M_LED_MO_DUP(x) ((x)<<10) /* Bit 11..10: Duplex */
1251#define PHY_M_LED_MO_10(x) ((x)<<8) /* Bit 9.. 8: Link 10 */
1252#define PHY_M_LED_MO_100(x) ((x)<<6) /* Bit 7.. 6: Link 100 */
1253#define PHY_M_LED_MO_1000(x) ((x)<<4) /* Bit 5.. 4: Link 1000 */
1254#define PHY_M_LED_MO_RX(x) ((x)<<2) /* Bit 3.. 2: Rx */
1255#define PHY_M_LED_MO_TX(x) ((x)<<0) /* Bit 1.. 0: Tx */
1256
1257enum { 1248enum {
1258 MO_LED_NORM = 0, 1249 PHY_M_LED_MO_DUP = 3<<10,/* Bit 11..10: Duplex */
1259 MO_LED_BLINK = 1, 1250 PHY_M_LED_MO_10 = 3<<8, /* Bit 9.. 8: Link 10 */
1260 MO_LED_OFF = 2, 1251 PHY_M_LED_MO_100 = 3<<6, /* Bit 7.. 6: Link 100 */
1261 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,
1262}; 1259};
1263 1260
1264/***** 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 *****/
@@ -1295,9 +1292,9 @@ enum {
1295 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) */
1296}; 1293};
1297 1294
1298#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)
1299#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)
1300#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)
1301 1298
1302enum { 1299enum {
1303 LED_PAR_CTRL_COLX = 0x00, 1300 LED_PAR_CTRL_COLX = 0x00,
@@ -1553,8 +1550,8 @@ enum {
1553 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) */
1554}; 1551};
1555 1552
1556#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)
1557#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)
1558 1555
1559/* GM_PHY_ADDR 16 bit r/w GPHY Address Register */ 1556/* GM_PHY_ADDR 16 bit r/w GPHY Address Register */
1560enum { 1557enum {