[U-Boot] [PATCH] net/phy: fixup for get_phy_id

commit 3c6928fd7b0f84 "net: phy: fix warnings with W=1" caused some PHYs(e.g. CS4315/CS4340) not working. This patch fixes the warning and make those special PHYs working as well.
Signed-off-by: Shengzhou Liu Shengzhou.Liu@freescale.com --- drivers/net/phy/phy.c | 2 +- include/phy.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index df7e945..dd665ba 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -581,7 +581,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) +int __weak get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id) { int phy_reg;
diff --git a/include/phy.h b/include/phy.h index d117fc1..2adfb44 100644 --- a/include/phy.h +++ b/include/phy.h @@ -241,6 +241,7 @@ int phy_teranetics_init(void); int phy_vitesse_init(void);
int board_phy_config(struct phy_device *phydev); +int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id);
/* PHY UIDs for various PHYs that are referenced in external code */ #define PHY_UID_CS4340 0x13e51002

Hi Shengzhou Liu,
On Tue, Apr 7, 2015 at 5:46 AM, Shengzhou Liu Shengzhou.Liu@freescale.com wrote:
commit 3c6928fd7b0f84 "net: phy: fix warnings with W=1" caused some PHYs(e.g. CS4315/CS4340) not working. This patch fixes the warning and make those special PHYs working as well.
Signed-off-by: Shengzhou Liu Shengzhou.Liu@freescale.com
Applied to net/next, thanks!
-Joe
participants (2)
-
Joe Hershberger
-
Shengzhou Liu