[U-Boot] [PATCH v2 3/6] arm: mvf600: Add FEC support for Vybrid MVF600

Alison Wang b18965 at freescale.com
Tue May 14 11:51:45 CEST 2013


This patch adds FEC support for Vybrid MVF600 platform.
Add code to use RMII for MVF600.

Signed-off-by: Alison Wang <b18965 at freescale.com>
---
Changes in v2:
- Use common FEC driver fec_mxc.c

 drivers/net/fec_mxc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 4dbcdca..21e58f4 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -518,7 +518,11 @@ static int fec_open(struct eth_device *edev)
 		u32 ecr = readl(&fec->eth->ecntrl) & ~FEC_ECNTRL_SPEED;
 		u32 rcr = (readl(&fec->eth->r_cntrl) &
 				~(FEC_RCNTRL_RMII | FEC_RCNTRL_RMII_10T)) |
-				FEC_RCNTRL_RGMII | FEC_RCNTRL_MII_MODE;
+				FEC_RCNTRL_MII_MODE;
+		if (fec->xcv_type == RGMII)
+			rcr |= FEC_RCNTRL_RGMII;
+		else if (fec->xcv_type == RMII)
+			rcr |= FEC_RCNTRL_RMII;
 		if (speed == _1000BASET)
 			ecr |= FEC_ECNTRL_SPEED;
 		else if (speed != _100BASET)
-- 
1.8.0




More information about the U-Boot mailing list