net: dsa: microchip: support for "ethernet-ports" node
The dsa.yaml device tree binding allows "ethernet-ports" (preferred) and "ports". Signed-off-by: Christian Eggers <ceggers@arri.de> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
4f36d97786
commit
44e53c8882
|
@ -426,7 +426,9 @@ int ksz_switch_register(struct ksz_device *dev,
|
|||
ret = of_get_phy_mode(dev->dev->of_node, &interface);
|
||||
if (ret == 0)
|
||||
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)
|
||||
for_each_available_child_of_node(ports, port) {
|
||||
if (of_property_read_u32(port, "reg",
|
||||
|
|
Loading…
Reference in New Issue