mirror of https://github.com/OpenIPC/firmware.git
Moved higmac phy patch to 3516dv100 directory (#527)
parent
f3718bda59
commit
fb1ec4529b
|
@ -0,0 +1,32 @@
|
|||
diff --git a/home/goody/of_mdio.c b/output/build/linux-4.9.37/drivers/of/of_mdio.c
|
||||
index 262281bd..5f338cd6 100644
|
||||
--- 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 = 0;
|
||||
+EXPORT_SYMBOL(higmacphy);
|
||||
+MODULE_PARM_DESC(higmacphy, "Select phyaddr for higmac driver.\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)
|
||||
@@ -248,7 +256,14 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
|
||||
if (of_find_property(child, "reg", NULL))
|
||||
continue;
|
||||
|
||||
- for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
|
||||
+ if (higmacphy>0) {
|
||||
+ dev_info(&mdio->dev, "higmacphy addr is set in kernel arguments: phy %s at address %i\n",
|
||||
+ child->name, higmacphy);
|
||||
+
|
||||
+ if (of_mdiobus_child_is_phy(child))
|
||||
+ of_mdiobus_register_phy(mdio, child, higmacphy);
|
||||
+ }
|
||||
+ else for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
|
||||
/* skip already registered PHYs */
|
||||
if (mdiobus_is_registered_device(mdio, addr))
|
||||
continue;
|
Loading…
Reference in New Issue