diff options
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) | |||
293 | ret = ti_pipe3_dpll_wait_lock(phy); | 293 | ret = ti_pipe3_dpll_wait_lock(phy); |
294 | } | 294 | } |
295 | 295 | ||
296 | /* Program the DPLL only if not locked */ | 296 | /* SATA has issues if re-programmed when locked */ |
297 | val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_STATUS); | 297 | val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_STATUS); |
298 | if (!(val & PLL_LOCK)) | 298 | if ((val & PLL_LOCK) && of_device_is_compatible(phy->dev->of_node, |
299 | if (ti_pipe3_dpll_program(phy)) | 299 | "ti,phy-pipe3-sata")) |
300 | return -EINVAL; | 300 | return ret; |
301 | |||
302 | /* Program the DPLL */ | ||
303 | ret = ti_pipe3_dpll_program(phy); | ||
304 | if (ret) { | ||
305 | ti_pipe3_disable_clocks(phy); | ||
306 | return -EINVAL; | ||
307 | } | ||
301 | 308 | ||
302 | return ret; | 309 | return ret; |
303 | } | 310 | } |