31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samuel Holland <samuel@sholland.org>
|
|
Date: Sun, 3 Jan 2021 05:25:40 -0600
|
|
Subject: [PATCH] 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.
|
|
|
|
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
|
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
|
|
---
|
|
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 6 ++----
|
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
|
|
|
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
|
|
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
|
|
@@ -806,11 +806,9 @@ static int sun8i_dwmac_power_internal_ph
|
|
/* Make sure the EPHY is properly reseted, as U-Boot may leave
|
|
* it at deasserted state, and thus it may fail to reset EMAC.
|
|
*/
|
|
- 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;
|
|
}
|