net: stmmac: dwmac-sun8i: fix allwinner,leds-active-low handling

The driver expect "allwinner,leds-active-low" to be in PHY node, but
the binding doc expect it to be in MAC node.

Since all board DT use it also in MAC node, the driver need to search
allwinner,leds-active-low in MAC node.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Corentin Labbe 2017-11-28 17:48:22 +01:00 committed by David S. Miller
parent f8821f96ae
commit 1c08ac0c4b
1 changed files with 1 additions and 2 deletions

View File

@ -808,8 +808,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)
val, reg);
if (gmac->variant->soc_has_internal_phy) {
if (of_property_read_bool(priv->plat->phy_node,
"allwinner,leds-active-low"))
if (of_property_read_bool(node, "allwinner,leds-active-low"))
reg |= H3_EPHY_LED_POL;
else
reg &= ~H3_EPHY_LED_POL;