phy: renesas: r8a779f0-ether-serdes: Reset in .init()
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Wed, 11 Oct 2023 08:18:16 +0000 (17:18 +0900)
committerVinod Koul <vkoul@kernel.org>
Fri, 13 Oct 2023 10:13:30 +0000 (15:43 +0530)
Reset this PHY in .init() instead of probe() for re-initializing
this PHY after probed correctly.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20231011081817.257113-2-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/renesas/r8a779f0-ether-serdes.c

index 683b19bc411a84a3039b7fd18f79a03b7a821042..ba1109d6bdd90f4e248beabacee5cd717159cc08 100644 (file)
@@ -214,6 +214,10 @@ static int r8a779f0_eth_serdes_hw_init(struct r8a779f0_eth_serdes_channel *chann
        if (dd->initialized)
                return 0;
 
+       reset_control_reset(dd->reset);
+
+       usleep_range(1000, 2000);
+
        ret = r8a779f0_eth_serdes_common_init_ram(dd);
        if (ret)
                return ret;
@@ -356,8 +360,6 @@ static int r8a779f0_eth_serdes_probe(struct platform_device *pdev)
        if (IS_ERR(dd->reset))
                return PTR_ERR(dd->reset);
 
-       reset_control_reset(dd->reset);
-
        for (i = 0; i < R8A779F0_ETH_SERDES_NUM; i++) {
                struct r8a779f0_eth_serdes_channel *channel = &dd->channel[i];