summaryrefslogtreecommitdiff
path: root/drivers/net/smc911x.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-12-23 15:40:12 -0500
committerWolfgang Denk <wd@denx.de>2011-01-09 18:06:50 +0100
commit8ef583a0351590a91394499eb5ca2ab8a703d959 (patch)
tree36dafbd4bdd7e46130aec04bbc0dbfe26e896d9f /drivers/net/smc911x.c
parent4ffeab2cc00b61bc4616d9e3c25d33937b0feb34 (diff)
miiphy: convert to linux/mii.h
The include/miiphy.h header duplicates a lot of things from linux/mii.h. So punt all the things that overlap to keep the API simple and to make merging between U-Boot and Linux simpler. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'drivers/net/smc911x.c')
-rw-r--r--drivers/net/smc911x.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 3da4c35fc2..aeafeba44c 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -103,11 +103,11 @@ static void smc911x_phy_configure(struct eth_device *dev)
smc911x_phy_reset(dev);
- smc911x_miiphy_write(dev, 1, PHY_BMCR, PHY_BMCR_RESET);
+ smc911x_miiphy_write(dev, 1, MII_BMCR, BMCR_RESET);
mdelay(1);
- smc911x_miiphy_write(dev, 1, PHY_ANAR, 0x01e1);
- smc911x_miiphy_write(dev, 1, PHY_BMCR, PHY_BMCR_AUTON |
- PHY_BMCR_RST_NEG);
+ smc911x_miiphy_write(dev, 1, MII_ADVERTISE, 0x01e1);
+ smc911x_miiphy_write(dev, 1, MII_BMCR, BMCR_ANENABLE |
+ BMCR_ANRESTART);
timeout = 5000;
do {
@@ -115,9 +115,9 @@ static void smc911x_phy_configure(struct eth_device *dev)
if ((timeout--) == 0)
goto err_out;
- if (smc911x_miiphy_read(dev, 1, PHY_BMSR, &status) != 0)
+ if (smc911x_miiphy_read(dev, 1, MII_BMSR, &status) != 0)
goto err_out;
- } while (!(status & PHY_BMSR_LS));
+ } while (!(status & BMSR_LSTATUS));
printf(DRIVERNAME ": phy initialized\n");