[U-Boot] [PATCH 2/2] am33xx: Board: Make CPSW section of ethernet initialization depend on CPSW driver

Joel A Fernandes joelagnel at ti.com
Tue May 7 17:52:55 CEST 2013


Not doing so breaks cases where CPSW is not required such as for USB RNDIS network boot.

Signed-off-by: Joel A Fernandes <joelagnel at ti.com>
---
 board/ti/am335x/board.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index b371376..eeb5e29 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -496,6 +496,7 @@ int board_eth_init(bd_t *bis)
 			eth_setenv_enetaddr("ethaddr", mac_addr);
 	}
 
+#ifdef CONFIG_DRIVER_TI_CPSW
 	if (board_is_bone() || board_is_bone_lt() || board_is_idk()) {
 		writel(MII_MODE_ENABLE, &cdev->miisel);
 		cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
@@ -511,6 +512,7 @@ int board_eth_init(bd_t *bis)
 		printf("Error %d registering CPSW switch\n", rv);
 	else
 		n += rv;
+#endif
 
 	/*
 	 *
-- 
1.7.4.1



More information about the U-Boot mailing list