Boards may have things they want done before or after normal phy config.
Letting the boards call drv->config allows them more flexibilty.
Boards affected by this change are corenet_ds and mpc8544ds.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
 #if defined(CONFIG_SYS_P4080_ERRATUM_SERDES9) && defined(CONFIG_PHY_TERANETICS)
 int board_phy_config(struct phy_device *phydev)
 {
+       if (phydev->drv->config)
+               phydev->drv->config(phydev);
        if (phydev->drv->uid == PHY_UID_TN2020) {
                unsigned long timeout = 1 * 1000; /* 1 seconds */
                enum srds_prtcl device;
 
        uint phyid;
        struct mii_dev *bus = phydev->bus;
 
+       if (phydev->drv->config)
+               phydev->drv->config(phydev);
        if (do_once)
                return 0;
 
 
 
 static int __board_phy_config(struct phy_device *phydev)
 {
+       if (phydev->drv->config)
+               return phydev->drv->config(phydev);
        return 0;
 }
 
 
 int phy_config(struct phy_device *phydev)
 {
-       if (phydev->drv->config)
-               phydev->drv->config(phydev);
-
        /* Invoke an optional board-specific helper */
        board_phy_config(phydev);