As some PHYs have non-standard PHY ID registers, PHY Id can't be read correctly by current get_phy_id function, so we enable get_phy_id redefinable to permit specific PHY driver having own specific get_phy_id function.
Signed-off-by: Shengzhou Liu <shengzhou....@freescale.com> --- drivers/net/phy/phy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index c691fbb..c8e7f64 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -577,7 +577,7 @@ static struct phy_device *phy_device_create(struct mii_dev *bus, int addr, * Description: Reads the ID registers of the PHY at @addr on the * @bus, stores it in @phy_id and returns zero on success. */ -static int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id) +static int __get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id) { int phy_reg; @@ -601,6 +601,9 @@ static int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id) return 0; } +int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id) + __attribute__((weak, alias("__get_phy_id"))); + static struct phy_device *create_phy_by_mask(struct mii_dev *bus, unsigned phy_mask, int devad, phy_interface_t interface) { -- 1.8.0 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot