aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/dsa
diff options
context:
space:
mode:
authorAnsuel Smith2021-05-14 23:00:05 +0200
committerDavid S. Miller2021-05-14 15:30:22 -0700
commit1ee0591a1093c2448642c33433483e9260275f7b (patch)
treeadd7afc688a8967188ba4a1ec989d273571ef31c /drivers/net/dsa
parent95ffeaf18b3bb90eeef52cbf7d79ccc9d0345ff5 (diff)
net: dsa: qca8k: add ethernet-ports fallback to setup_mdio_bus
Dsa now also supports ethernet-ports. Add this new binding as a fallback if the ports node can't be found. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r--drivers/net/dsa/qca8k.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 35ff4cf08786..cc9ab35f8b17 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -719,6 +719,9 @@ qca8k_setup_mdio_bus(struct qca8k_priv *priv)
ports = of_get_child_by_name(priv->dev->of_node, "ports");
if (!ports)
+ ports = of_get_child_by_name(priv->dev->of_node, "ethernet-ports");
+
+ if (!ports)
return -EINVAL;
for_each_available_child_of_node(ports, port) {