summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorShengzhou Liu <Shengzhou.Liu@freescale.com>2014-04-11 16:14:17 +0800
committerTom Rini <trini@ti.com>2014-05-12 15:19:45 -0400
commit597fe041a85fe3b1bf6044adf5e132f7a5457000 (patch)
tree059a003a55b9126c186047438366fa6c87d419e0 /drivers
parent02aa4c538838edc918ff4e7e9e4121259552ef70 (diff)
downloadblackbird-obmc-uboot-597fe041a85fe3b1bf6044adf5e132f7a5457000.tar.gz
blackbird-obmc-uboot-597fe041a85fe3b1bf6044adf5e132f7a5457000.zip
net/phy: enable get_phy_id redefinable
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/phy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index c691fbbbc6..230ed97dd1 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -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;
OpenPOWER on IntegriCloud