Commit 44e53c88 authored by Christian Eggers's avatar Christian Eggers Committed by Jakub Kicinski

net: dsa: microchip: support for "ethernet-ports" node

The dsa.yaml device tree binding allows "ethernet-ports" (preferred) and
"ports".
Signed-off-by: default avatarChristian Eggers <ceggers@arri.de>
Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 4f36d977
...@@ -426,7 +426,9 @@ int ksz_switch_register(struct ksz_device *dev, ...@@ -426,7 +426,9 @@ int ksz_switch_register(struct ksz_device *dev,
ret = of_get_phy_mode(dev->dev->of_node, &interface); ret = of_get_phy_mode(dev->dev->of_node, &interface);
if (ret == 0) if (ret == 0)
dev->compat_interface = interface; dev->compat_interface = interface;
ports = of_get_child_by_name(dev->dev->of_node, "ports"); ports = of_get_child_by_name(dev->dev->of_node, "ethernet-ports");
if (!ports)
ports = of_get_child_by_name(dev->dev->of_node, "ports");
if (ports) if (ports)
for_each_available_child_of_node(ports, port) { for_each_available_child_of_node(ports, port) {
if (of_property_read_u32(port, "reg", if (of_property_read_u32(port, "reg",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment