[U-Boot] [PATCH 0/2] ea20: build fixes

There are two separate issues causing failure of ea20 builds.
I discovered them while trying to build a da850evm load with RMII support. The second patch affects all boards that could use CONFIG_DRIVER_TI_EMAC_USE_RMII of which ea20 is the only one set default in u-boot. The first patch fixes the second problem I ran into trying to build ea20 after developping the RMII patch.
Ben Gardiner (2): ea20: fix libea20.o not found ea20: fix undefined PHY_* errors
board/davinci/ea20/Makefile | 2 +- drivers/net/davinci_emac.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)

This patch fixes ea20 after commit 6d8962e814c15807dd6ac5757904be2a02d187b8 where $(obj)lib$(BOARD).a was changed to $(obj)lib$(BOARD).o in almost all the Makefiles except ea20, probably due to merge path of the changes in 2010.12.
Signed-off-by: Ben Gardinerbengardiner@nanometrics.ca CC: Sebastien Carlier sebastien.carlier@gmail.com --- board/davinci/ea20/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/board/davinci/ea20/Makefile b/board/davinci/ea20/Makefile index ddd2564..67ec461 100644 --- a/board/davinci/ea20/Makefile +++ b/board/davinci/ea20/Makefile @@ -25,7 +25,7 @@
include $(TOPDIR)/config.mk
-LIB = $(obj)lib$(BOARD).a +LIB = $(obj)lib$(BOARD).o
COBJS-y += ea20.o

On 01/11/2011 08:48 PM, Ben Gardiner wrote:
This patch fixes ea20 after commit 6d8962e814c15807dd6ac5757904be2a02d187b8 where $(obj)lib$(BOARD).a was changed to $(obj)lib$(BOARD).o in almost all the Makefiles except ea20, probably due to merge path of the changes in 2010.12.
Signed-off-by: Ben Gardinerbengardiner@nanometrics.ca CC: Sebastien Carlier sebastien.carlier@gmail.com
board/davinci/ea20/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Acked-by : Stefano Babic sbabic@denx.de
Regards, Stefano

Dear Ben Gardiner,
In message c8fd275ce8aec64e2b0bb19584c0ea563622460d.1294774935.git.bengardiner@nanometrics.ca you wrote:
This patch fixes ea20 after commit 6d8962e814c15807dd6ac5757904be2a02d187b8 where $(obj)lib$(BOARD).a was changed to $(obj)lib$(BOARD).o in almost all the Makefiles except ea20, probably due to merge path of the changes in 2010.12.
Signed-off-by: Ben Gardinerbengardiner@nanometrics.ca CC: Sebastien Carlier sebastien.carlier@gmail.com
board/davinci/ea20/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied, thanks.
Sandeep, as this is a strictly board-specific thing and you did not respond yet I decided to pick this up directly, hope this is ok with you.
Best regards,
Wolfgang Denk

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 Gardinerbengardiner@nanometrics.ca CC: Mike Frysinger vapier@gentoo.org --- drivers/net/davinci_emac.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
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);

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

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 Gardinerbengardiner@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

On 01/11/2011 08:48 PM, Ben Gardiner wrote:
There are two separate issues causing failure of ea20 builds.
I discovered them while trying to build a da850evm load with RMII support. The second patch affects all boards that could use CONFIG_DRIVER_TI_EMAC_USE_RMII of which ea20 is the only one set default in u-boot. The first patch fixes the second problem I ran into trying to build ea20 after developping the RMII patch.
Ben Gardiner (2): ea20: fix libea20.o not found ea20: fix undefined PHY_* errors
board/davinci/ea20/Makefile | 2 +- drivers/net/davinci_emac.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
Hi Ben,
thanks for discovering this issue and to fix it !
Stefano
participants (4)
-
Ben Gardiner
-
Mike Frysinger
-
Stefano Babic
-
Wolfgang Denk