]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: stmmac: dwmac-sun8i: Use reset_control_reset
authorSamuel Holland <samuel@sholland.org>
Wed, 17 Feb 2021 04:20:04 +0000 (22:20 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Feb 2021 21:42:56 +0000 (13:42 -0800)
Use the appropriate function instead of reimplementing it,
and update the error message to match the code.

Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c

index 3c3d0b99d3e8c60edced0ff950c4ba2667f5e16b..b61f442ed3033837cf4eff741f5854b72dfce532 100644 (file)
@@ -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;
        }