aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--drivers/of/of_mdio.c38
-rw-r--r--include/linux/of_mdio.h10
2 files changed, 0 insertions, 48 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
diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h
index 0aa367e316cb..d449018d0726 100644
--- a/include/linux/of_mdio.h
+++ b/include/linux/of_mdio.h
@@ -22,9 +22,6 @@ extern struct phy_device *of_phy_connect(struct net_device *dev,
22struct phy_device *of_phy_attach(struct net_device *dev, 22struct phy_device *of_phy_attach(struct net_device *dev,
23 struct device_node *phy_np, u32 flags, 23 struct device_node *phy_np, u32 flags,
24 phy_interface_t iface); 24 phy_interface_t iface);
25extern struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
26 void (*hndlr)(struct net_device *),
27 phy_interface_t iface);
28 25
29extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); 26extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np);
30 27
@@ -59,13 +56,6 @@ static inline struct phy_device *of_phy_attach(struct net_device *dev,
59 return NULL; 56 return NULL;
60} 57}
61 58
62static inline struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
63 void (*hndlr)(struct net_device *),
64 phy_interface_t iface)
65{
66 return NULL;
67}
68
69static inline struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np) 59static inline struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np)
70{ 60{
71 return NULL; 61 return NULL;