diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-12-23 15:40:12 -0500 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-01-09 18:06:50 +0100 |
commit | 8ef583a0351590a91394499eb5ca2ab8a703d959 (patch) | |
tree | 36dafbd4bdd7e46130aec04bbc0dbfe26e896d9f /drivers/net/mcfmii.c | |
parent | 4ffeab2cc00b61bc4616d9e3c25d33937b0feb34 (diff) | |
download | u-boot-imx-8ef583a0351590a91394499eb5ca2ab8a703d959.zip u-boot-imx-8ef583a0351590a91394499eb5ca2ab8a703d959.tar.gz u-boot-imx-8ef583a0351590a91394499eb5ca2ab8a703d959.tar.bz2 |
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/mcfmii.c')
-rw-r--r-- | drivers/net/mcfmii.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c index 401182d..f959c00 100644 --- a/drivers/net/mcfmii.c +++ b/drivers/net/mcfmii.c @@ -171,7 +171,7 @@ int mii_discover_phy(struct eth_device *dev) for (phyno = 0; phyno < 32 && phyaddr < 0; ++phyno) { - phytype = mii_send(mk_mii_read(phyno, PHY_PHYIDR1)); + phytype = mii_send(mk_mii_read(phyno, MII_PHYSID1)); #ifdef ET_DEBUG printf("PHY type 0x%x pass %d type\n", phytype, pass); #endif @@ -180,7 +180,7 @@ int mii_discover_phy(struct eth_device *dev) phyaddr = phyno; phytype <<= 16; phytype |= - mii_send(mk_mii_read(phyno, PHY_PHYIDR2)); + mii_send(mk_mii_read(phyno, MII_PHYSID2)); #ifdef ET_DEBUG printf("PHY @ 0x%x pass %d\n", phyno, pass); @@ -256,18 +256,18 @@ void __mii_init(void) status = 0; i++; /* Read PHY control register */ - miiphy_read(dev->name, info->phy_addr, PHY_BMCR, &status); + miiphy_read(dev->name, info->phy_addr, MII_BMCR, &status); /* If phy set to autonegotiate, wait for autonegotiation done, * if phy is not autonegotiating, just wait for link up. */ - if ((status & PHY_BMCR_AUTON) == PHY_BMCR_AUTON) { - linkgood = (PHY_BMSR_AUTN_COMP | PHY_BMSR_LS); + if ((status & BMCR_ANENABLE) == BMCR_ANENABLE) { + linkgood = (BMSR_ANEGCOMPLETE | BMSR_LSTATUS); } else { - linkgood = PHY_BMSR_LS; + linkgood = BMSR_LSTATUS; } /* Read PHY status register */ - miiphy_read(dev->name, info->phy_addr, PHY_BMSR, &status); + miiphy_read(dev->name, info->phy_addr, MII_BMSR, &status); if ((status & linkgood) == linkgood) break; |