]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: qca8k: rework and simplify mdiobus logic
authorAnsuel Smith <ansuelsmth@gmail.com>
Fri, 15 Apr 2022 23:30:14 +0000 (01:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Apr 2022 12:28:28 +0000 (13:28 +0100)
commit57d84b31e634b5973ce44854820e6478336c3b3c
treeff36033db046c360853f683fca0b0387a688114b
parent0bf4e03d93842310c99597b19f236addbc4feee3
net: dsa: qca8k: rework and simplify mdiobus logic

In an attempt to reduce qca8k_priv space, rework and simplify mdiobus
logic.
We now declare a mdiobus instead of relying on DSA phy_read/write even
if a mdio node is not present. This is all to make the qca8k ops static
and not switch specific. With a legacy implementation where port doesn't
have a phy map declared in the dts with a mdio node, we declare a
'qca8k-legacy' mdiobus. The conversion logic is used as legacy read and
write ops are used instead of the internal one.
Also drop the legacy_phy_port_mapping as we now declare mdiobus with ops
that already address the workaround.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c
drivers/net/dsa/qca8k.h