aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa
diff options
context:
space:
mode:
authorChris Healy <cphealy@gmail.com>2012-01-22 16:20:54 -0500
committerDavid S. Miller <davem@davemloft.net>2012-01-23 14:46:07 -0500
commitedd664bbba53f771d4a6d4559ed6e1ff48b46406 (patch)
tree337fbc38ecf426f7bf3d0acf534d8a4e7527a7cb /drivers/net/dsa
parenta5a1195559f2e20bd975f58e50f53ebe84d5cca6 (diff)
dsa: Add reporting of silicon revision for Marvell 88E6123/88E6161/88E6165 switches.
Add reporting of silicon revision during the probe function for Marvell 88E6123/88E6161/88E6165 switches. Signed-off-by: Chris Healy <cphealy@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r--drivers/net/dsa/mv88e6123_61_65.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/net/dsa/mv88e6123_61_65.c b/drivers/net/dsa/mv88e6123_61_65.c
index c0a458fc698f..6f23c9521f0e 100644
--- a/drivers/net/dsa/mv88e6123_61_65.c
+++ b/drivers/net/dsa/mv88e6123_61_65.c
@@ -20,12 +20,25 @@ static char *mv88e6123_61_65_probe(struct mii_bus *bus, int sw_addr)
20 20
21 ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03); 21 ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03);
22 if (ret >= 0) { 22 if (ret >= 0) {
23 ret &= 0xfff0; 23 if (ret == 0x1212)
24 if (ret == 0x1210) 24 return "Marvell 88E6123 (A1)";
25 if (ret == 0x1213)
26 return "Marvell 88E6123 (A2)";
27 if ((ret & 0xfff0) == 0x1210)
25 return "Marvell 88E6123"; 28 return "Marvell 88E6123";
26 if (ret == 0x1610) 29
30 if (ret == 0x1612)
31 return "Marvell 88E6161 (A1)";
32 if (ret == 0x1613)
33 return "Marvell 88E6161 (A2)";
34 if ((ret & 0xfff0) == 0x1610)
27 return "Marvell 88E6161"; 35 return "Marvell 88E6161";
28 if (ret == 0x1650) 36
37 if (ret == 0x1652)
38 return "Marvell 88E6165 (A1)";
39 if (ret == 0x1653)
40 return "Marvell 88e6165 (A2)";
41 if ((ret & 0xfff0) == 0x1650)
29 return "Marvell 88E6165"; 42 return "Marvell 88E6165";
30 } 43 }
31 44