From 029aff138902466bdfc1e62c761e89f8d37e83ea Mon Sep 17 00:00:00 2001 From: Terry Lv <r65388@freescale.com> Date: Tue, 16 Mar 2010 16:09:39 +0800 Subject: ENGR000121601: FEC not work in mx28 u-boot FEC not work in mx28 u-boot. Signed-off-by: Terry Lv <r65388@freescale.com> --- drivers/net/mxc_fec.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/mxc_fec.c b/drivers/net/mxc_fec.c index 1a9f53f..314496e 100644 --- a/drivers/net/mxc_fec.c +++ b/drivers/net/mxc_fec.c @@ -336,12 +336,21 @@ static void setFecDuplexSpeed(volatile fec_t *fecp, unsigned char addr, if ((dup_spd >> 16) == FULL) { /* Set maximum frame length */ +#ifdef CONFIG_RMII + fecp->rcr = FEC_RCR_MAX_FL(PKT_MAXBUF_SIZE) | FEC_RCR_RMII_MODE; +#else fecp->rcr = FEC_RCR_MAX_FL(PKT_MAXBUF_SIZE) | FEC_RCR_MII_MODE; +#endif fecp->tcr = FEC_TCR_FDEN; } else { /* Half duplex mode */ +#ifdef CONFIG_RMII fecp->rcr = FEC_RCR_MAX_FL(PKT_MAXBUF_SIZE) | - FEC_RCR_MII_MODE | FEC_RCR_DRT; + FEC_RCR_RMII_MODE | FEC_RCR_DRT; +#else + fecp->rcr = FEC_RCR_MAX_FL(PKT_MAXBUF_SIZE) | + FEC_RCR_MII_MODE | FEC_RCR_DRT; +#endif fecp->tcr &= ~FEC_TCR_FDEN; } -- cgit v1.1