ea20: fix undefined PHY_* errors
authorBen Gardiner <bengardiner@nanometrics.ca>
Tue, 11 Jan 2011 19:48:17 +0000 (14:48 -0500)
committerWolfgang Denk <wd@denx.de>
Mon, 11 Apr 2011 19:28:44 +0000 (21:28 +0200)
This patch fixes ea20 after 8ef583a0351590a91394499eb5ca2ab8a703d959 where
the u-boot custom PHY_ macros were replaced with those of linux/mii.h MII_
definitions except in the RMII support for davinci_emac. Probably also due to
the merge path of changes in 2010.12.

Signed-off-by: Ben Gardiner<bengardiner@nanometrics.ca>
CC: Mike Frysinger <vapier@gentoo.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
drivers/net/davinci_emac.c

index c359f54f9df8040249ef50ec5c9c4e3c8534bcc8..66c0d13c2bd9ec42ba2eab1ffca39f6349430fcd 100644 (file)
@@ -247,10 +247,10 @@ static int gen_get_link_speed(int phy_addr)
                        (tmp & 0x04)) {
 #if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII) && \
                defined(CONFIG_MACH_DAVINCI_DA850_EVM)
-               davinci_eth_phy_read(phy_addr, PHY_ANLPAR, &tmp);
+               davinci_eth_phy_read(phy_addr, MII_LPA, &tmp);
 
                /* Speed doesn't matter, there is no setting for it in EMAC. */
-               if (tmp & (PHY_ANLPAR_TXFD | PHY_ANLPAR_10FD)) {
+               if (tmp & (LPA_100FULL | LPA_10FULL)) {
                        /* set EMAC for Full Duplex  */
                        writel(EMAC_MACCONTROL_MIIEN_ENABLE |
                                        EMAC_MACCONTROL_FULLDUPLEX_ENABLE,
@@ -261,7 +261,7 @@ static int gen_get_link_speed(int phy_addr)
                                        &adap_emac->MACCONTROL);
                }
 
-               if (tmp & (PHY_ANLPAR_TXFD | PHY_ANLPAR_TX))
+               if (tmp & (LPA_100FULL | LPA_100HALF))
                        writel(readl(&adap_emac->MACCONTROL) |
                                        EMAC_MACCONTROL_RMIISPEED_100,
                                         &adap_emac->MACCONTROL);