aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2014-10-29 13:44:55 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-30 14:54:10 -0400
commita93e464a45827cbbbfc89183cf4a769b18f31535 (patch)
tree43f2e391d944ddaf03a862ab4a37cc65b0d73105 /drivers/net/dsa
parent3de6aa4c35eaa917b47a387a4092bd53f7afca4b (diff)
net: dsa: Report known silicon revisions for Marvell 88E6131
Report known silicon revisions when probing Marvell 88E6131 switches. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r--drivers/net/dsa/mv88e6131.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/dsa/mv88e6131.c b/drivers/net/dsa/mv88e6131.c
index 244c735014fa..1230f52aa70e 100644
--- a/drivers/net/dsa/mv88e6131.c
+++ b/drivers/net/dsa/mv88e6131.c
@@ -21,6 +21,7 @@
21#define ID_6085 0x04a0 21#define ID_6085 0x04a0
22#define ID_6095 0x0950 22#define ID_6095 0x0950
23#define ID_6131 0x1060 23#define ID_6131 0x1060
24#define ID_6131_B2 0x1066
24 25
25static char *mv88e6131_probe(struct device *host_dev, int sw_addr) 26static char *mv88e6131_probe(struct device *host_dev, int sw_addr)
26{ 27{
@@ -32,12 +33,15 @@ static char *mv88e6131_probe(struct device *host_dev, int sw_addr)
32 33
33 ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03); 34 ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03);
34 if (ret >= 0) { 35 if (ret >= 0) {
35 ret &= 0xfff0; 36 int ret_masked = ret & 0xfff0;
36 if (ret == ID_6085) 37
38 if (ret_masked == ID_6085)
37 return "Marvell 88E6085"; 39 return "Marvell 88E6085";
38 if (ret == ID_6095) 40 if (ret_masked == ID_6095)
39 return "Marvell 88E6095/88E6095F"; 41 return "Marvell 88E6095/88E6095F";
40 if (ret == ID_6131) 42 if (ret == ID_6131_B2)
43 return "Marvell 88E6131 (B2)";
44 if (ret_masked == ID_6131)
41 return "Marvell 88E6131"; 45 return "Marvell 88E6131";
42 } 46 }
43 47