diff options
author | Terry Lv <r65388@freescale.com> | 2009-06-24 11:31:38 +0800 |
---|---|---|
committer | Fred Fan <r01011@freescale.com> | 2009-09-10 17:02:19 +0800 |
commit | 23b6527003ca6a12d7872e9e552160041d8b6285 (patch) | |
tree | 9abe3d5483436632fceb0cfcc51c64c9b443dc67 /drivers/net | |
parent | c6e205a9fde82e69608850c24686cc972cf258f1 (diff) | |
download | u-boot-imx-23b6527003ca6a12d7872e9e552160041d8b6285.zip u-boot-imx-23b6527003ca6a12d7872e9e552160041d8b6285.tar.gz u-boot-imx-23b6527003ca6a12d7872e9e552160041d8b6285.tar.bz2 |
ENGR00113611: Add FEC support for BBG2.
Add FEC support for BBG2.
Signed-off-by: Terry Lv <r65388@freescale.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/mxc_fec.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/mxc_fec.c b/drivers/net/mxc_fec.c index 218c432..91d248b 100644 --- a/drivers/net/mxc_fec.c +++ b/drivers/net/mxc_fec.c @@ -121,7 +121,7 @@ static inline void fec_localhw_setup(volatile fec_t *fecp) fecp->fec_miigsk_enr = FEC_MIIGSK_ENR_EN; } #else -static inline void fec_localhw_setup(struct fec_t *fecp) +static inline void fec_localhw_setup(fec_t *fecp) { } #endif @@ -271,7 +271,7 @@ static inline u16 getFecPhyStatus(volatile fec_t *fecp, unsigned char addr) return val; } -static void setFecDuplexSpeed(volatile fec_t *fecp, unsigned char addr, +static void setFecDuplexSpeed(volatile fec_t *fecp, unsigned char addr, int dup_spd) { unsigned short val; @@ -386,7 +386,7 @@ int fec_send(struct eth_device *dev, volatile void *packet, int length) j++; } if (j >= FEC_MAX_TIMEOUT) - printf("TX timeout packet at %x\n", packet); + printf("TX timeout packet at %p\n", packet); #ifdef ET_DEBUG printf("%s[%d] %s: cycles: %d status: %x retry cnt: %d\n", @@ -612,7 +612,7 @@ int fec_init(struct eth_device *dev, bd_t *bd) fec_reset(dev); - fec_localhw_setup(fecp); + fec_localhw_setup((fec_t *)fecp); #if defined (CONFIG_CMD_MII) || defined (CONFIG_MII) || \ defined (CONFIG_DISCOVER_PHY) @@ -622,10 +622,11 @@ int fec_init(struct eth_device *dev, bd_t *bd) if (info->phy_addr < 0 || info->phy_addr > 0x1F) info->phy_addr = mxc_fec_mii_discover_phy(dev); #endif - setFecDuplexSpeed(fecp, bd, info->dup_spd); + setFecDuplexSpeed(fecp, (unsigned char)bd, info->dup_spd); #else #ifndef CONFIG_DISCOVER_PHY - setFecDuplexSpeed(fecp, bd, (FECDUPLEX << 16) | FECSPEED); + setFecDuplexSpeed(fecp, (unsigned char)bd, + (FECDUPLEX << 16) | FECSPEED); #endif /* ifndef CONFIG_SYS_DISCOVER_PHY */ #endif /* CONFIG_CMD_MII || CONFIG_MII */ |