[U-Boot] [PATCH 1/2] mx28evk: Convert to PHYLIB

Fabio Estevam festevam at gmail.com
Fri Jun 7 02:04:18 CEST 2013


From: Fabio Estevam <fabio.estevam at freescale.com>

Phylib framework is more appropriate for handling the PHYs, so let's use it
on mx28evk.

Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
 board/freescale/mx28evk/mx28evk.c | 7 +++++++
 include/configs/mx28evk.h         | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c
index 4edd9f4..fc204fc 100644
--- a/board/freescale/mx28evk/mx28evk.c
+++ b/board/freescale/mx28evk/mx28evk.c
@@ -105,6 +105,13 @@ int board_mmc_init(bd_t *bis)
 #endif
 
 #ifdef	CONFIG_CMD_NET
+int board_phy_config(struct phy_device *phydev)
+{
+	if (phydev->drv->config)
+		phydev->drv->config(phydev);
+
+	return 0;
+}
 
 int board_eth_init(bd_t *bis)
 {
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index de69182..a3e2c0e 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -176,6 +176,8 @@
 #define CONFIG_MII
 #define CONFIG_FEC_XCV_TYPE	RMII
 #define CONFIG_MX28_FEC_MAC_IN_OCOTP
+#define CONFIG_PHYLIB
+#define CONFIG_PHY_SMSC
 #endif
 
 /* RTC */
-- 
1.8.1.2



More information about the U-Boot mailing list