[PATCH V9 2/7] phy: Add drivers for PCIe and SATA phy on SPEAr13xx

Viresh Kumar viresh.kumar at linaro.org
Sun Jul 13 22:34:16 PDT 2014


On 14 July 2014 10:54, Viresh Kumar <viresh.kumar at linaro.org> wrote:
> These makes sense. Will add them.

Kishon, here is how the diff looks like now:

diff --git a/drivers/phy/phy-spear1340-miphy.c
b/drivers/phy/phy-spear1340-miphy.c
index 5e39231..8de98ad 100644
--- a/drivers/phy/phy-spear1340-miphy.c
+++ b/drivers/phy/phy-spear1340-miphy.c
@@ -101,10 +101,13 @@ static int spear1340_miphy_sata_init(struct
spear1340_miphy_priv *priv)
        regmap_update_bits(priv->misc, SPEAR1340_PCM_CFG,
                           SPEAR1340_PCM_CFG_SATA_POWER_EN,
                           SPEAR1340_PCM_CFG_SATA_POWER_EN);
+       /* Wait for SATA power domain on */
        msleep(20);
+
        /* Disable PCIE SATA Controller reset */
        regmap_update_bits(priv->misc, SPEAR1340_PERIP1_SW_RST,
                           SPEAR1340_PERIP1_SW_RSATA, 0);
+       /* Wait for SATA reset de-assert completion */
        msleep(20);

        return 0;
@@ -121,10 +124,12 @@ static int spear1340_miphy_sata_exit(struct
spear1340_miphy_priv *priv)
        regmap_update_bits(priv->misc, SPEAR1340_PERIP1_SW_RST,
                           SPEAR1340_PERIP1_SW_RSATA,
                           SPEAR1340_PERIP1_SW_RSATA);
+       /* Wait for SATA power domain off */
        msleep(20);
        /* Switch off sata power domain */
        regmap_update_bits(priv->misc, SPEAR1340_PCM_CFG,
                           SPEAR1340_PCM_CFG_SATA_POWER_EN, 0);
+       /* Wait for SATA reset assert completion */
        msleep(20);

        return 0;



More information about the linux-arm-kernel mailing list