mirror of https://github.com/OpenIPC/firmware.git
27 lines
897 B
Diff
27 lines
897 B
Diff
--- a/drivers/of/of_mdio.c
|
|
+++ b/drivers/of/of_mdio.c
|
|
@@ -25,6 +25,11 @@
|
|
MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>");
|
|
MODULE_LICENSE("GPL");
|
|
|
|
+int higmacphy = -1;
|
|
+EXPORT_SYMBOL(higmacphy);
|
|
+MODULE_PARM_DESC(higmacphy, "Force higmac driver to use specified PHY addr instead of DTS default value.\n");
|
|
+module_param_named(higmacphy, higmacphy, int, 0600);
|
|
+
|
|
/* Extract the clause 22 phy ID from the compatible string of the form
|
|
* ethernet-phy-idAAAA.BBBB */
|
|
static int of_get_phy_id(struct device_node *device, u32 *phy_id)
|
|
@@ -233,6 +238,11 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
|
|
continue;
|
|
}
|
|
|
|
+ if (higmacphy != -1) {
|
|
+ dev_info(&mdio->dev, "higmac phy addr in %s is set to %i\n", child->name, higmacphy);
|
|
+ addr = higmacphy;
|
|
+ }
|
|
+
|
|
if (of_mdiobus_child_is_phy(child))
|
|
of_mdiobus_register_phy(mdio, child, addr);
|
|
else
|