]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
net/phy: enable get_phy_id redefinable
authorShengzhou Liu <Shengzhou.Liu@freescale.com>
Fri, 11 Apr 2014 08:14:17 +0000 (16:14 +0800)
committerTom Rini <trini@ti.com>
Mon, 12 May 2014 19:19:45 +0000 (15:19 -0400)
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.Liu@freescale.com>
drivers/net/phy/phy.c

index c691fbbbc61b6e15cb97e3ef85e7cd47fd6f1edf..230ed97dd12def5b6913b030150a17d80910a4dc 100644 (file)
@@ -18,6 +18,7 @@
 #include <phy.h>
 #include <errno.h>
 #include <linux/err.h>
+#include <linux/compiler.h>
 
 /* Generic PHY support and helper functions */
 
@@ -577,7 +578,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;