diff options
| author | Marek Vasut <marek.vasut@gmail.com> | 2011-09-11 18:05:36 +0000 | 
|---|---|---|
| committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2011-09-30 22:01:02 +0200 | 
| commit | 2e5f44213fd55ca53c3751061e19b0c54857900b (patch) | |
| tree | e5176122a42dd71a96365ee79fb55baf7225e8cf /drivers/net/fec_mxc.c | |
| parent | 9e27e9dca14a3bca74a5dcc87231769bc6a7117f (diff) | |
| download | olio-uboot-2014.01-2e5f44213fd55ca53c3751061e19b0c54857900b.tar.xz olio-uboot-2014.01-2e5f44213fd55ca53c3751061e19b0c54857900b.zip | |
FEC: Allow registering MII postconfiguration callback
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Diffstat (limited to 'drivers/net/fec_mxc.c')
| -rw-r--r-- | drivers/net/fec_mxc.c | 14 | 
1 files changed, 13 insertions, 1 deletions
| diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 3c593aaaf..3aaec374a 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -153,6 +153,7 @@ static int fec_miiphy_write(const char *dev, uint8_t phyAddr, uint8_t regAddr,  static int miiphy_restart_aneg(struct eth_device *dev)  {  	struct fec_priv *fec = (struct fec_priv *)dev->priv; +	int ret = 0;  	/*  	 * Wake up from sleep if necessary @@ -173,7 +174,11 @@ static int miiphy_restart_aneg(struct eth_device *dev)  			LPA_10HALF | PHY_ANLPAR_PSB_802_3);  	miiphy_write(dev->name, fec->phy_id, MII_BMCR,  			BMCR_ANENABLE | BMCR_ANRESTART); -	return 0; + +	if (fec->mii_postcall) +		ret = fec->mii_postcall(fec->phy_id); + +	return ret;  }  static int miiphy_wait_aneg(struct eth_device *dev) @@ -786,3 +791,10 @@ int fecmxc_initialize_multi(bd_t *bd, int dev_id, int phy_id, uint32_t addr)  	return lout;  } + +int fecmxc_register_mii_postcall(struct eth_device *dev, int (*cb)(int)) +{ +	struct fec_priv *fec = (struct fec_priv *)dev->priv; +	fec->mii_postcall = cb; +	return 0; +} |