[U-Boot] [PATCH 2/9] NET: fec_mxc.c: Add support for MII for MX5 SOCs

Stefano Babic sbabic at denx.de
Wed Feb 22 11:24:34 CET 2012


Signed-off-by: Stefano Babic <sbabic at denx.de>
CC: Fabio Estevam <fabio.estevam at freescale.com>
---
 drivers/net/fec_mxc.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 1fdd071..201e5d2 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -419,8 +419,13 @@ static int fec_open(struct eth_device *edev)
 	while (readw(&fec->eth->miigsk_enr) & MIIGSK_ENR_READY)
 		udelay(2);
 
+#if !defined(CONFIG_MII)
 	/* configure gasket for RMII, 50 MHz, no loopback, and no echo */
 	writew(MIIGSK_CFGR_IF_MODE_RMII, &fec->eth->miigsk_cfgr);
+#else
+	/* configure gasket for MII, no loopback, and no echo */
+	writew(MIIGSK_CFGR_IF_MODE_MII, &fec->eth->miigsk_cfgr);
+#endif
 
 	/* re-enable the gasket */
 	writew(MIIGSK_ENR_EN, &fec->eth->miigsk_enr);
-- 
1.7.5.4



More information about the U-Boot mailing list