aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/dsa/mv88e6123_61_65.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2015-04-02 04:06:39 +0200
committerDavid S. Miller <davem@davemloft.net>2015-04-01 22:55:41 -0400
commitcca8b1337541253f0414f744919c09f8b10bd962 (patch)
tree8607d962aba7ab439c27b91352ef0f61d7d8f134 /drivers/net/dsa/mv88e6123_61_65.c
parente413e7e1f7493910274c552d7f70ae396c93199a (diff)
downloadlinux-linaro-stable-cca8b1337541253f0414f744919c09f8b10bd962.tar.gz
net: dsa: Use mnemonics rather than register numbers
Rather than refer to registers by number, define mnemonics. Also define mnemonics for the commonly used bits within the registers. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6123_61_65.c')
-rw-r--r--drivers/net/dsa/mv88e6123_61_65.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/dsa/mv88e6123_61_65.c b/drivers/net/dsa/mv88e6123_61_65.c
index 81cc24448164..b4af6d5aff7c 100644
--- a/drivers/net/dsa/mv88e6123_61_65.c
+++ b/drivers/net/dsa/mv88e6123_61_65.c
@@ -25,27 +25,27 @@ static char *mv88e6123_61_65_probe(struct device *host_dev, int sw_addr)
if (bus == NULL)
return NULL;
- ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03);
+ ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), PORT_SWITCH_ID);
if (ret >= 0) {
- if (ret == ID_6123_A1)
+ if (ret == PORT_SWITCH_ID_6123_A1)
return "Marvell 88E6123 (A1)";
- if (ret == ID_6123_A2)
+ if (ret == PORT_SWITCH_ID_6123_A2)
return "Marvell 88E6123 (A2)";
- if ((ret & 0xfff0) == ID_6123)
+ if ((ret & 0xfff0) == PORT_SWITCH_ID_6123)
return "Marvell 88E6123";
- if (ret == ID_6161_A1)
+ if (ret == PORT_SWITCH_ID_6161_A1)
return "Marvell 88E6161 (A1)";
- if (ret == ID_6161_A2)
+ if (ret == PORT_SWITCH_ID_6161_A2)
return "Marvell 88E6161 (A2)";
- if ((ret & 0xfff0) == ID_6161)
+ if ((ret & 0xfff0) == PORT_SWITCH_ID_6161)
return "Marvell 88E6161";
- if (ret == ID_6165_A1)
+ if (ret == PORT_SWITCH_ID_6165_A1)
return "Marvell 88E6165 (A1)";
- if (ret == ID_6165_A2)
+ if (ret == PORT_SWITCH_ID_6165_A2)
return "Marvell 88e6165 (A2)";
- if ((ret & 0xfff0) == ID_6165)
+ if ((ret & 0xfff0) == PORT_SWITCH_ID_6165)
return "Marvell 88E6165";
}
@@ -247,11 +247,11 @@ static int mv88e6123_61_65_setup(struct dsa_switch *ds)
return ret;
switch (ps->id) {
- case ID_6123:
+ case PORT_SWITCH_ID_6123:
ps->num_ports = 3;
break;
- case ID_6161:
- case ID_6165:
+ case PORT_SWITCH_ID_6161:
+ case PORT_SWITCH_ID_6165:
ps->num_ports = 6;
break;
default: