mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-11 20:36:45 +07:00
net: ethernet: sun4i-emac: Support phy-handle property for finding PHYs
The sun4i-emac uses the "phy" property to find the PHY it's supposed to
use. This property was deprecated in favor of "phy-handle" in commit
8c5b094476
("dt-bindings: net: sun4i-emac: Convert the binding to a
schemas").
Add support for this new property name, and fall back to the old one in
case the device tree hasn't been updated.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f7813d5c63
commit
5c4e2e1af3
@ -860,7 +860,9 @@ static int emac_probe(struct platform_device *pdev)
|
||||
goto out_clk_disable_unprepare;
|
||||
}
|
||||
|
||||
db->phy_node = of_parse_phandle(np, "phy", 0);
|
||||
db->phy_node = of_parse_phandle(np, "phy-handle", 0);
|
||||
if (!db->phy_node)
|
||||
db->phy_node = of_parse_phandle(np, "phy", 0);
|
||||
if (!db->phy_node) {
|
||||
dev_err(&pdev->dev, "no associated PHY\n");
|
||||
ret = -ENODEV;
|
||||
|
Loading…
Reference in New Issue
Block a user