aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of_mdio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/of_mdio.h')
-rw-r--r--include/linux/of_mdio.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h
index 881a7c3571f4..a70c9493d55a 100644
--- a/include/linux/of_mdio.h
+++ b/include/linux/of_mdio.h
@@ -22,12 +22,12 @@ 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
28extern void of_mdiobus_link_phydev(struct mii_bus *mdio,
29 struct phy_device *phydev);
30
31#else /* CONFIG_OF */ 31#else /* CONFIG_OF */
32static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) 32static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
33{ 33{
@@ -59,17 +59,30 @@ static inline struct phy_device *of_phy_attach(struct net_device *dev,
59 return NULL; 59 return NULL;
60} 60}
61 61
62static inline struct phy_device *of_phy_connect_fixed_link(struct net_device *dev, 62static inline struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np)
63 void (*hndlr)(struct net_device *),
64 phy_interface_t iface)
65{ 63{
66 return NULL; 64 return NULL;
67} 65}
68 66
69static inline struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np) 67static inline void of_mdiobus_link_phydev(struct mii_bus *mdio,
68 struct phy_device *phydev)
70{ 69{
71 return NULL;
72} 70}
73#endif /* CONFIG_OF */ 71#endif /* CONFIG_OF */
74 72
73#if defined(CONFIG_OF) && defined(CONFIG_FIXED_PHY)
74extern int of_phy_register_fixed_link(struct device_node *np);
75extern bool of_phy_is_fixed_link(struct device_node *np);
76#else
77static inline int of_phy_register_fixed_link(struct device_node *np)
78{
79 return -ENOSYS;
80}
81static inline bool of_phy_is_fixed_link(struct device_node *np)
82{
83 return false;
84}
85#endif
86
87
75#endif /* __LINUX_OF_MDIO_H */ 88#endif /* __LINUX_OF_MDIO_H */