[U-Boot] [PATCH 3/4] Blackfin: bfin_mac: use new eth_device enetaddr members
Mike Frysinger
vapier at gentoo.org
Fri Nov 11 01:11:06 CET 2011
Simplifies the code nicely.
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
drivers/net/bfin_mac.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index dcc781a..ab2fe71 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -281,16 +281,8 @@ static int bfin_miiphy_init(struct eth_device *dev, int *opmode)
static int bfin_EMAC_setup_addr(struct eth_device *dev)
{
- bfin_write_EMAC_ADDRLO(
- dev->enetaddr[0] |
- dev->enetaddr[1] << 8 |
- dev->enetaddr[2] << 16 |
- dev->enetaddr[3] << 24
- );
- bfin_write_EMAC_ADDRHI(
- dev->enetaddr[4] |
- dev->enetaddr[5] << 8
- );
+ bfin_write_EMAC_ADDRLO(dev->enetaddr32);
+ bfin_write_EMAC_ADDRHI(dev->enetaddr16[2]);
return 0;
}
--
1.7.6.1
More information about the U-Boot
mailing list