mirror of
https://xff.cz/git/u-boot/
synced 2025-10-29 17:43:36 +01:00
net: phy: make board_phy_config responsible for calling drv->config
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>
This commit is contained in:
committed by
Albert ARIBAUD
parent
8682aba7da
commit
9fafe7dab9
@@ -96,6 +96,8 @@ struct mii_dev *mii_dev_for_muxval(u32 muxval)
|
|||||||
#if defined(CONFIG_SYS_P4080_ERRATUM_SERDES9) && defined(CONFIG_PHY_TERANETICS)
|
#if defined(CONFIG_SYS_P4080_ERRATUM_SERDES9) && defined(CONFIG_PHY_TERANETICS)
|
||||||
int board_phy_config(struct phy_device *phydev)
|
int board_phy_config(struct phy_device *phydev)
|
||||||
{
|
{
|
||||||
|
if (phydev->drv->config)
|
||||||
|
phydev->drv->config(phydev);
|
||||||
if (phydev->drv->uid == PHY_UID_TN2020) {
|
if (phydev->drv->uid == PHY_UID_TN2020) {
|
||||||
unsigned long timeout = 1 * 1000; /* 1 seconds */
|
unsigned long timeout = 1 * 1000; /* 1 seconds */
|
||||||
enum srds_prtcl device;
|
enum srds_prtcl device;
|
||||||
|
|||||||
@@ -261,6 +261,8 @@ int board_phy_config(struct phy_device *phydev)
|
|||||||
uint phyid;
|
uint phyid;
|
||||||
struct mii_dev *bus = phydev->bus;
|
struct mii_dev *bus = phydev->bus;
|
||||||
|
|
||||||
|
if (phydev->drv->config)
|
||||||
|
phydev->drv->config(phydev);
|
||||||
if (do_once)
|
if (do_once)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
@@ -733,6 +733,8 @@ int phy_startup(struct phy_device *phydev)
|
|||||||
|
|
||||||
static int __board_phy_config(struct phy_device *phydev)
|
static int __board_phy_config(struct phy_device *phydev)
|
||||||
{
|
{
|
||||||
|
if (phydev->drv->config)
|
||||||
|
return phydev->drv->config(phydev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -741,9 +743,6 @@ int board_phy_config(struct phy_device *phydev)
|
|||||||
|
|
||||||
int phy_config(struct phy_device *phydev)
|
int phy_config(struct phy_device *phydev)
|
||||||
{
|
{
|
||||||
if (phydev->drv->config)
|
|
||||||
phydev->drv->config(phydev);
|
|
||||||
|
|
||||||
/* Invoke an optional board-specific helper */
|
/* Invoke an optional board-specific helper */
|
||||||
board_phy_config(phydev);
|
board_phy_config(phydev);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user