From 0bad7aa337cf16bed99f5f71613e587f61068dde Mon Sep 17 00:00:00 2001 From: Richard Retanubun <richardretanu...@ruggedcom.com> Date: Mon, 9 Feb 2009 10:41:48 -0500 Subject: [PATCH] Fixed GPIO pin initialization for CONFIG_M5271 FEC. This processor only have one FEC and its MDIO pins are located at a different offset than the code used for the current CONFIG_M527x
Signed-off-by: Richard Retanubun <richardretanu...@ruggedcom.com> --- Tesed on M5271EVB eval platform. Without this patch the FEC driver will report no PHY attached if the bootloader does not pre-initialize the PAR_FECI2C GPIO register. drivers/net/fec.c | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 2769083..43f29f8 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -1402,7 +1402,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev) } #endif -#if defined(CONFIG_M527x) +#if defined(CONFIG_M527x) && !defined(CONFIG_M5271) /* Set up gpio outputs for MII lines */ { volatile u8 *gpio_par_fec; @@ -1423,7 +1423,18 @@ static void __inline__ fec_request_intrs(struct net_device *dev) *gpio_par_fec |= 0xc0; #endif /* CONFIG_FEC2 */ } -#endif /* CONFIG_M527x */ +#endif /* CONFIG_M527x && !CONFIG_M5271 */ + +#if defined(CONFIG_M5271) + /* Set up gpio outputs for MII lines */ + { + volatile u8 *gpio_par_feci2c; + + /* Set up gpio outputs for FEC0 MII lines */ + gpio_par_feci2c = (volatile u8 *)(MCF_IPSBAR + 0x100047); + *gpio_par_feci2c |= 0xf0; + } +#endif } static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep) -- 1.5.6.5 _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev