aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/of_mdio.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 4c1e01ed16dc..b85709458639 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -23,27 +23,6 @@
23MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>"); 23MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>");
24MODULE_LICENSE("GPL"); 24MODULE_LICENSE("GPL");
25 25
26static void of_set_phy_supported(struct phy_device *phydev, u32 max_speed)
27{
28 /* The default values for phydev->supported are provided by the PHY
29 * driver "features" member, we want to reset to sane defaults fist
30 * before supporting higher speeds.
31 */
32 phydev->supported &= PHY_DEFAULT_FEATURES;
33
34 switch (max_speed) {
35 default:
36 return;
37
38 case SPEED_1000:
39 phydev->supported |= PHY_1000BT_FEATURES;
40 case SPEED_100:
41 phydev->supported |= PHY_100BT_FEATURES;
42 case SPEED_10:
43 phydev->supported |= PHY_10BT_FEATURES;
44 }
45}
46
47/* Extract the clause 22 phy ID from the compatible string of the form 26/* Extract the clause 22 phy ID from the compatible string of the form
48 * ethernet-phy-idAAAA.BBBB */ 27 * ethernet-phy-idAAAA.BBBB */
49static int of_get_phy_id(struct device_node *device, u32 *phy_id) 28static int of_get_phy_id(struct device_node *device, u32 *phy_id)
@@ -104,11 +83,6 @@ static int of_mdiobus_register_phy(struct mii_bus *mdio, struct device_node *chi
104 return 1; 83 return 1;
105 } 84 }
106 85
107 /* Set phydev->supported based on the "max-speed" property
108 * if present */
109 if (!of_property_read_u32(child, "max-speed", &max_speed))
110 of_set_phy_supported(phy, max_speed);
111
112 dev_dbg(&mdio->dev, "registered phy %s at address %i\n", 86 dev_dbg(&mdio->dev, "registered phy %s at address %i\n",
113 child->name, addr); 87 child->name, addr);
114 88