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
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)
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;
+}
int mv88e61xx_switch_initialize(struct mv88e61xx_config *swconfig);
#endif /* CONFIG_MV88E61XX_SWITCH */
+/*
+ * Allow FEC to fine-tune MII configuration on boards which require this.
+ */
+int fecmxc_register_mii_postcall(struct eth_device *dev, int (*cb)(int));
+
#endif /* _NETDEV_H_ */