The phy needs to be re-initialized on resume for the link to properly come
back up.

Signed-off-by: Hans de Goede <hdego...@redhat.com>
---
 drivers/ata/ahci_imx.c | 22 +++-------------------
 1 file changed, 3 insertions(+), 19 deletions(-)

diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
index e58e062..68d89fa 100644
--- a/drivers/ata/ahci_imx.c
+++ b/drivers/ata/ahci_imx.c
@@ -265,27 +265,11 @@ static int imx_ahci_resume(struct device *dev)
 {
        struct ata_host *host = dev_get_drvdata(dev);
        struct ahci_host_priv *hpriv = host->private_data;
-       struct imx_ahci_priv *imxpriv = hpriv->plat_data;
        int ret;
 
-       if (hpriv->target_pwr) {
-               ret = regulator_enable(hpriv->target_pwr);
-               if (ret)
-                       return ret;
-       }
-
-       if (!imxpriv->no_device) {
-               ret = ahci_platform_enable_clks(hpriv);
-               if (ret < 0) {
-                       dev_err(dev, "pre-enable sata_ref clock err:%d\n", ret);
-                       return ret;
-               }
-
-               regmap_update_bits(imxpriv->gpr, IOMUXC_GPR13,
-                               IMX6Q_GPR13_SATA_MPLL_CLK_EN,
-                               IMX6Q_GPR13_SATA_MPLL_CLK_EN);
-               usleep_range(1000, 2000);
-       }
+       ret = imx_ahci_phy_init(hpriv);
+       if (ret)
+               return ret;
 
        return ahci_platform_resume_host(dev);
 }
-- 
1.8.5.3

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to