summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/rdc
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2012-01-04 08:59:35 +0000
committerDavid S. Miller <davem@davemloft.net>2012-01-04 15:55:53 -0500
commit58dbc691e6ca6689402424db60f4a54745a38c67 (patch)
tree52410c5e5b909ed219a0c47f53c99bd9222c962e /drivers/net/ethernet/rdc
parent4e16d6ebd65b4f2c4e3f780b4c5704beef64019c (diff)
downloadlinux-next-58dbc691e6ca6689402424db60f4a54745a38c67.tar.gz
r6040: use MAC_RST bit definition with MCR1 read/writes
MAC_RST bit is already defined, use it instead of 0x1 where applicable. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/rdc')
-rw-r--r--drivers/net/ethernet/rdc/r6040.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index f4dddceecb04..4665a3932b98 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -371,7 +371,7 @@ static void r6040_init_mac_regs(struct net_device *dev)
iowrite16(MAC_RST, ioaddr + MCR1);
while (limit--) {
cmd = ioread16(ioaddr + MCR1);
- if (cmd & 0x1)
+ if (cmd & MAC_RST)
break;
}
/* Reset internal state machine */
@@ -453,7 +453,7 @@ static void r6040_down(struct net_device *dev)
iowrite16(MAC_RST, ioaddr + MCR1); /* Reset RDC MAC */
while (limit--) {
cmd = ioread16(ioaddr + MCR1);
- if (cmd & 0x1)
+ if (cmd & MAC_RST)
break;
}
@@ -735,7 +735,7 @@ static void r6040_mac_address(struct net_device *dev)
u16 *adrp;
/* MAC operation register */
- iowrite16(0x01, ioaddr + MCR1); /* Reset MAC */
+ iowrite16(MAC_RST, ioaddr + MCR1); /* Reset MAC */
iowrite16(2, ioaddr + MAC_SM); /* Reset internal state machine */
iowrite16(0, ioaddr + MAC_SM);
mdelay(5);