phy: ti-pipe3: Fix suspend/resume and module reload
authorRoger Quadros <rogerq@ti.com>
Thu, 6 Mar 2014 14:38:44 +0000 (16:38 +0200)
committerKishon Vijay Abraham I <kishon@ti.com>
Sun, 9 Mar 2014 07:15:11 +0000 (12:45 +0530)
Due to Errata i783, SATA breaks if its DPLL is idled. The recommeded
workaround to issue a softreset to the SATA controller doesn't seem to
work. Here we just prevent SATA DPLL from Idling and hence avoid
the issue altogether.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/phy-ti-pipe3.c

index 12cc900491a453a898774697d2915fc933873ec7..5913676546137935896751008169fc54779ab643 100644 (file)
@@ -238,6 +238,10 @@ static int ti_pipe3_exit(struct phy *x)
        u32 val;
        unsigned long timeout;
 
+       /* SATA DPLL can't be powered down due to Errata i783 */
+       if (of_device_is_compatible(phy->dev->of_node, "ti,phy-pipe3-sata"))
+               return 0;
+
        /* Put DPLL in IDLE mode */
        val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_CONFIGURATION2);
        val |= PLL_IDLE;