diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-08-05 11:36:15 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-08-05 11:36:15 +0300 |
commit | 94558e265b9539b2ecec98d037bae51c902663c1 (patch) | |
tree | e2782bc903759c2a8bf0af9b3a8ec090a3b1bd3e /drivers/phy/phy-ti-pipe3.c | |
parent | 5ac9056753e79ac5ad1ccc3c99b311688e46e8c9 (diff) | |
parent | 1cf915d305b6e1d57db6c35c208016f9747ba3c6 (diff) | |
download | linux-94558e265b9539b2ecec98d037bae51c902663c1.tar.xz |
Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued
Backmerge the 4.8 pull request state from Dave - conflicts were
getting out of hand, and Chris has some patches which outright don't
apply without everything merged together again.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/phy/phy-ti-pipe3.c')
-rw-r--r-- | drivers/phy/phy-ti-pipe3.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/phy/phy-ti-pipe3.c b/drivers/phy/phy-ti-pipe3.c index 0a477d24cf76..bf46844dc387 100644 --- a/drivers/phy/phy-ti-pipe3.c +++ b/drivers/phy/phy-ti-pipe3.c @@ -293,11 +293,18 @@ static int ti_pipe3_init(struct phy *x) ret = ti_pipe3_dpll_wait_lock(phy); } - /* Program the DPLL only if not locked */ + /* SATA has issues if re-programmed when locked */ val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_STATUS); - if (!(val & PLL_LOCK)) - if (ti_pipe3_dpll_program(phy)) - return -EINVAL; + if ((val & PLL_LOCK) && of_device_is_compatible(phy->dev->of_node, + "ti,phy-pipe3-sata")) + return ret; + + /* Program the DPLL */ + ret = ti_pipe3_dpll_program(phy); + if (ret) { + ti_pipe3_disable_clocks(phy); + return -EINVAL; + } return ret; } |