/* This function is a temporary stop-gap and will be removed soon. It is only to support the fs_enet, ucc_geth and gianfar Ethernet drivers. Do not call this function from new drivers.  */
struct phy_device* of_phy_connect_fixed_link(struct net_device *dev, void(*hndlr)(struct net_device *), phy_interface_t iface)
/* This function is a temporary stop-gap and will be removed soon. It is only to support the fs_enet, ucc_geth and gianfar Ethernet drivers. Do not call this function from new drivers.  */
struct phy_device* of_phy_connect_fixed_link(struct net_device *dev, void(*hndlr)(struct net_device *), phy_interface_t iface)
{
	struct device_node *net_np;
	char bus_id[MII_BUS_ID_SIZE + 3];
	struct phy_device *phy;
	const u32 *phy_id;
	int sz;
	if (!dev->dev.parent)
		return NULL;
	net_np = dev_archdata_get_node(&dev->dev.parent->archdata);
	if (!net_np)
		return NULL;
	phy_id = of_get_property(net_np, "fixed-link", &sz);
	if (!phy_id || sz < sizeof(*phy_id))
		return NULL;
	sprintf(bus_id, PHY_ID_FMT, "0", phy_id[0]);
	phy = phy_connect(dev, bus_id, hndlr, 0, iface);
	return IS_ERR(phy) ? NULL : phy;
}