aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of/of_mdio.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2014-05-22 12:47:50 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-22 15:16:44 -0400
commitea3429c77d4e34cb2983b90e49a5506fedf70b98 (patch)
treea160edaec2d56734aa134790bfd893eff4e81c12 /drivers/of/of_mdio.c
parent87009814cdbb23f69ecdd42cbbd737a82fa7f450 (diff)
of: mdio: remove of_phy_connect_fixed_link
All in-tree drivers have been converted to use the new pair of functions: of_is_fixed_phy_link() plus of_phy_register_fixed_link(), we can now safely remove of_phy_connect_fixed_link. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/of/of_mdio.c')
-rw-r--r--drivers/of/of_mdio.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 1def0bb5cb37..4c1e01ed16dc 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -246,44 +246,6 @@ struct phy_device *of_phy_connect(struct net_device *dev,
246EXPORT_SYMBOL(of_phy_connect); 246EXPORT_SYMBOL(of_phy_connect);
247 247
248/** 248/**
249 * of_phy_connect_fixed_link - Parse fixed-link property and return a dummy phy
250 * @dev: pointer to net_device claiming the phy
251 * @hndlr: Link state callback for the network device
252 * @iface: PHY data interface type
253 *
254 * This function is a temporary stop-gap and will be removed soon. It is
255 * only to support the fs_enet, ucc_geth and gianfar Ethernet drivers. Do
256 * not call this function from new drivers.
257 */
258struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
259 void (*hndlr)(struct net_device *),
260 phy_interface_t iface)
261{
262 struct device_node *net_np;
263 char bus_id[MII_BUS_ID_SIZE + 3];
264 struct phy_device *phy;
265 const __be32 *phy_id;
266 int sz;
267
268 if (!dev->dev.parent)
269 return NULL;
270
271 net_np = dev->dev.parent->of_node;
272 if (!net_np)
273 return NULL;
274
275 phy_id = of_get_property(net_np, "fixed-link", &sz);
276 if (!phy_id || sz < sizeof(*phy_id))
277 return NULL;
278
279 sprintf(bus_id, PHY_ID_FMT, "fixed-0", be32_to_cpu(phy_id[0]));
280
281 phy = phy_connect(dev, bus_id, hndlr, iface);
282 return IS_ERR(phy) ? NULL : phy;
283}
284EXPORT_SYMBOL(of_phy_connect_fixed_link);
285
286/**
287 * of_phy_attach - Attach to a PHY without starting the state machine 249 * of_phy_attach - Attach to a PHY without starting the state machine
288 * @dev: pointer to net_device claiming the phy 250 * @dev: pointer to net_device claiming the phy
289 * @phy_np: Node pointer for the PHY 251 * @phy_np: Node pointer for the PHY