Patchwork [U-Boot,2/2] ea20: fix undefined PHY_* errors

login
register
mail settings
Submitter Ben Gardiner
Date Jan. 11, 2011, 7:48 p.m.
Message ID <d12924b842f41b5473df8261c81206d3bfae26ef.1294774935.git.bengardiner@nanometrics.ca>
Download mbox | patch
Permalink /patch/78426/
State Accepted
Commit 7d2fade7b1cd08432d16f7af5b10a8d1c0213813
Delegated to: Sandeep Paulraj
Headers show

Comments

Ben Gardiner - Jan. 11, 2011, 7:48 p.m.
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>
---
 drivers/net/davinci_emac.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Mike Frysinger - Jan. 12, 2011, 11:22 p.m.
On Tuesday, January 11, 2011 14:48:17 Ben Gardiner wrote:
> 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.

yeah, i didnt have this driver when i wrote the patch
Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
Wolfgang Denk - April 11, 2011, 7:29 p.m.
Dear Ben Gardiner,

In message <d12924b842f41b5473df8261c81206d3bfae26ef.1294774935.git.bengardiner@nanometrics.ca> you wrote:
> 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>
> ---
>  drivers/net/davinci_emac.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 56cd2aa..533f7a4 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -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);