From patchwork Mon Nov 26 14:30:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,RFC] export genphy_parse_link() Date: Mon, 26 Nov 2012 04:30:44 -0000 From: Yegor Yefremov X-Patchwork-Id: 201708 Message-Id: To: u-boot@lists.denx.de I'm porting a phy driver from Linux to u-boot and was able to use genphy_parse_link() without a problem. As mentioned in comment to genphy_parse_link(), the routine itself was taken from Linux kernel and many phy drivers are using this generic function. Why wasn't it exported? Are there any issues? Regards, Yegor >From c20576e3ddbf92e68837238a2aef9c6c83c6fea2 Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Mon, 26 Nov 2012 15:25:55 +0100 Subject: [PATCH] phy: export genphy_parse_link() Signed-off-by: Yegor Yefremov --- drivers/net/phy/phy.c | 2 +- include/phy.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) -- 1.7.7 diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 1ffa791..c28ea70 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -279,7 +279,7 @@ int genphy_update_link(struct phy_device *phydev) * * Stolen from Linux's mii.c and phy_device.c */ -static int genphy_parse_link(struct phy_device *phydev) +int genphy_parse_link(struct phy_device *phydev) { int mii_reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMSR); diff --git a/include/phy.h b/include/phy.h index 3c30f11..1342ef7 100644 --- a/include/phy.h +++ b/include/phy.h @@ -209,6 +209,7 @@ int phy_register(struct phy_driver *drv); int genphy_config_aneg(struct phy_device *phydev); int genphy_restart_aneg(struct phy_device *phydev); int genphy_update_link(struct phy_device *phydev); +int genphy_parse_link(struct phy_device *phydev); int genphy_config(struct phy_device *phydev); int genphy_startup(struct phy_device *phydev); int genphy_shutdown(struct phy_device *phydev);