Commit 1c22f546 authored by Samuel Holland's avatar Samuel Holland Committed by David S. Miller

net: stmmac: dwmac-sun8i: Use reset_control_reset

Use the appropriate function instead of reimplementing it,
and update the error message to match the code.
Reviewed-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent afac1d34
......@@ -805,12 +805,12 @@ static int sun8i_dwmac_power_internal_phy(struct stmmac_priv *priv)
/* Make sure the EPHY is properly reseted, as U-Boot may leave
* it at deasserted state, and thus it may fail to reset EMAC.
*
* This assumes the driver has exclusive access to the EPHY reset.
*/
reset_control_assert(gmac->rst_ephy);
ret = reset_control_deassert(gmac->rst_ephy);
ret = reset_control_reset(gmac->rst_ephy);
if (ret) {
dev_err(priv->device, "Cannot deassert internal phy\n");
dev_err(priv->device, "Cannot reset internal PHY\n");
clk_disable_unprepare(gmac->ephy_clk);
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment