]> git.baikalelectronics.ru Git - kernel.git/commit
dt-bindings: net: dsa: mt7530: replace label = "cpu" with proper checks
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 12 Sep 2022 17:50:56 +0000 (20:50 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 20 Sep 2022 00:59:52 +0000 (17:59 -0700)
commit636e1392b0e1f7d46d2e056d68be9155db408ad7
tree3b1ebe551c0340fb25d3658d8433ff56d2162421
parent5954252f225bc897228c473369348f63fe46aad5
dt-bindings: net: dsa: mt7530: replace label = "cpu" with proper checks

The fact that some DSA device trees use 'label = "cpu"' for the CPU port
is nothing but blind cargo cult copying. The 'label' property was never
part of the DSA DT bindings for anything except the user ports, where it
provided a hint as to what name the created netdevs should use.

DSA does use the "cpu" port label to identify a CPU port in dsa_port_parse(),
but this is only for non-OF code paths (platform data).

The proper way to identify a CPU port is to look at whether the
'ethernet' phandle is present.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml