]> Git Repo - J-u-boot.git/commit
net: sun8i-emac: Make internal PHY handling more robust
authorAndre Przywara <[email protected]>
Wed, 21 Oct 2020 17:57:32 +0000 (23:27 +0530)
committerJagan Teki <[email protected]>
Wed, 21 Oct 2020 18:15:23 +0000 (23:45 +0530)
commit88ae8fba84d85454008e3c89fcb790f8d077d7b5
tree61f8eddcee90a9e0a7d3e67b6bd36febf5a10c50
parent7edcb4e288efb9eb4412373638dab87cd78d92ba
net: sun8i-emac: Make internal PHY handling more robust

The current implementation of sun8i_get_ephy_nodes() makes quite some
assumptions, in general relying on DT path names is a bad idea.
I think the idea of the code was to determine if we are using the
internal PHY, for which there are simpler and more robust methods:

Rewrite (and rename) the existing function to simply lookup the DT node
that "phy-handle" points to, using the device's DT node.
Then check whether the parent of that PHY node is using an "H3 internal
MDIO" compatible string. If we ever get another internal MDIO bus
implementation, we will probably need code adjustments anyway, so this
is good enough for now.

Signed-off-by: Andre Przywara <[email protected]>
[jagan: rebase on master]
Signed-off-by: Jagan Teki <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Tested-by: Amit Singh Tomar <[email protected]> # Pine64+
Reviewed-by: Jagan Teki <[email protected]>
drivers/net/sun8i_emac.c
This page took 0.032969 seconds and 4 git commands to generate.