diff options
Diffstat (limited to 'drivers/net/via-velocity.h')
| -rw-r--r-- | drivers/net/via-velocity.h | 77 |
1 files changed, 3 insertions, 74 deletions
diff --git a/drivers/net/via-velocity.h b/drivers/net/via-velocity.h index ef4a0f64ba16..c38191179fae 100644 --- a/drivers/net/via-velocity.h +++ b/drivers/net/via-velocity.h | |||
| @@ -1240,86 +1240,16 @@ struct velocity_context { | |||
| 1240 | u32 pattern[8]; | 1240 | u32 pattern[8]; |
| 1241 | }; | 1241 | }; |
| 1242 | 1242 | ||
| 1243 | |||
| 1244 | /* | ||
| 1245 | * MII registers. | ||
| 1246 | */ | ||
| 1247 | |||
| 1248 | |||
| 1249 | /* | 1243 | /* |
| 1250 | * Registers in the MII (offset unit is WORD) | 1244 | * Registers in the MII (offset unit is WORD) |
| 1251 | */ | 1245 | */ |
| 1252 | 1246 | ||
| 1253 | #define MII_REG_BMCR 0x00 // physical address | ||
| 1254 | #define MII_REG_BMSR 0x01 // | ||
| 1255 | #define MII_REG_PHYID1 0x02 // OUI | ||
| 1256 | #define MII_REG_PHYID2 0x03 // OUI + Module ID + REV ID | ||
| 1257 | #define MII_REG_ANAR 0x04 // | ||
| 1258 | #define MII_REG_ANLPAR 0x05 // | ||
| 1259 | #define MII_REG_G1000CR 0x09 // | ||
| 1260 | #define MII_REG_G1000SR 0x0A // | ||
| 1261 | #define MII_REG_MODCFG 0x10 // | ||
| 1262 | #define MII_REG_TCSR 0x16 // | ||
| 1263 | #define MII_REG_PLED 0x1B // | ||
| 1264 | // NS, MYSON only | ||
| 1265 | #define MII_REG_PCR 0x17 // | ||
| 1266 | // ESI only | ||
| 1267 | #define MII_REG_PCSR 0x17 // | ||
| 1268 | #define MII_REG_AUXCR 0x1C // | ||
| 1269 | |||
| 1270 | // Marvell 88E1000/88E1000S | 1247 | // Marvell 88E1000/88E1000S |
| 1271 | #define MII_REG_PSCR 0x10 // PHY specific control register | 1248 | #define MII_REG_PSCR 0x10 // PHY specific control register |
| 1272 | 1249 | ||
| 1273 | // | 1250 | // |
| 1274 | // Bits in the BMCR register | 1251 | // Bits in the Silicon revision register |
| 1275 | // | ||
| 1276 | #define BMCR_RESET 0x8000 // | ||
| 1277 | #define BMCR_LBK 0x4000 // | ||
| 1278 | #define BMCR_SPEED100 0x2000 // | ||
| 1279 | #define BMCR_AUTO 0x1000 // | ||
| 1280 | #define BMCR_PD 0x0800 // | ||
| 1281 | #define BMCR_ISO 0x0400 // | ||
| 1282 | #define BMCR_REAUTO 0x0200 // | ||
| 1283 | #define BMCR_FDX 0x0100 // | ||
| 1284 | #define BMCR_SPEED1G 0x0040 // | ||
| 1285 | // | ||
| 1286 | // Bits in the BMSR register | ||
| 1287 | // | ||
| 1288 | #define BMSR_AUTOCM 0x0020 // | ||
| 1289 | #define BMSR_LNK 0x0004 // | ||
| 1290 | |||
| 1291 | // | ||
| 1292 | // Bits in the ANAR register | ||
| 1293 | // | ||
| 1294 | #define ANAR_ASMDIR 0x0800 // Asymmetric PAUSE support | ||
| 1295 | #define ANAR_PAUSE 0x0400 // Symmetric PAUSE Support | ||
| 1296 | #define ANAR_T4 0x0200 // | ||
| 1297 | #define ANAR_TXFD 0x0100 // | ||
| 1298 | #define ANAR_TX 0x0080 // | ||
| 1299 | #define ANAR_10FD 0x0040 // | ||
| 1300 | #define ANAR_10 0x0020 // | ||
| 1301 | // | ||
| 1302 | // Bits in the ANLPAR register | ||
| 1303 | // | ||
| 1304 | #define ANLPAR_ASMDIR 0x0800 // Asymmetric PAUSE support | ||
| 1305 | #define ANLPAR_PAUSE 0x0400 // Symmetric PAUSE Support | ||
| 1306 | #define ANLPAR_T4 0x0200 // | ||
| 1307 | #define ANLPAR_TXFD 0x0100 // | ||
| 1308 | #define ANLPAR_TX 0x0080 // | ||
| 1309 | #define ANLPAR_10FD 0x0040 // | ||
| 1310 | #define ANLPAR_10 0x0020 // | ||
| 1311 | |||
| 1312 | // | ||
| 1313 | // Bits in the G1000CR register | ||
| 1314 | // | ||
| 1315 | #define G1000CR_1000FD 0x0200 // PHY is 1000-T Full-duplex capable | ||
| 1316 | #define G1000CR_1000 0x0100 // PHY is 1000-T Half-duplex capable | ||
| 1317 | |||
| 1318 | // | ||
| 1319 | // Bits in the G1000SR register | ||
| 1320 | // | 1252 | // |
| 1321 | #define G1000SR_1000FD 0x0800 // LP PHY is 1000-T Full-duplex capable | ||
| 1322 | #define G1000SR_1000 0x0400 // LP PHY is 1000-T Half-duplex capable | ||
| 1323 | 1253 | ||
| 1324 | #define TCSR_ECHODIS 0x2000 // | 1254 | #define TCSR_ECHODIS 0x2000 // |
| 1325 | #define AUXCR_MDPPS 0x0004 // | 1255 | #define AUXCR_MDPPS 0x0004 // |
| @@ -1338,7 +1268,6 @@ struct velocity_context { | |||
| 1338 | 1268 | ||
| 1339 | #define PHYID_REV_ID_MASK 0x0000000FUL | 1269 | #define PHYID_REV_ID_MASK 0x0000000FUL |
| 1340 | 1270 | ||
| 1341 | #define PHYID_GET_PHY_REV_ID(i) ((i) & PHYID_REV_ID_MASK) | ||
| 1342 | #define PHYID_GET_PHY_ID(i) ((i) & ~PHYID_REV_ID_MASK) | 1271 | #define PHYID_GET_PHY_ID(i) ((i) & ~PHYID_REV_ID_MASK) |
| 1343 | 1272 | ||
| 1344 | #define MII_REG_BITS_ON(x,i,p) do {\ | 1273 | #define MII_REG_BITS_ON(x,i,p) do {\ |
| @@ -1362,8 +1291,8 @@ struct velocity_context { | |||
| 1362 | 1291 | ||
| 1363 | #define MII_GET_PHY_ID(p) ({\ | 1292 | #define MII_GET_PHY_ID(p) ({\ |
| 1364 | u32 id;\ | 1293 | u32 id;\ |
| 1365 | velocity_mii_read((p),MII_REG_PHYID2,(u16 *) &id);\ | 1294 | velocity_mii_read((p),MII_PHYSID2,(u16 *) &id);\ |
| 1366 | velocity_mii_read((p),MII_REG_PHYID1,((u16 *) &id)+1);\ | 1295 | velocity_mii_read((p),MII_PHYSID1,((u16 *) &id)+1);\ |
| 1367 | (id);}) | 1296 | (id);}) |
| 1368 | 1297 | ||
| 1369 | /* | 1298 | /* |
