Merge tag 'phy-for-4.7-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus
Kishon writes: phy: for 4.7-rc *) Fix compiler warning in exynos-mipi-video *) Fix in ti-pipe3 PHY to program the DPLL even if it was already locked Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
This commit is contained in:
@@ -233,8 +233,12 @@ static inline int __is_running(const struct exynos_mipi_phy_desc *data,
|
||||
struct exynos_mipi_video_phy *state)
|
||||
{
|
||||
u32 val;
|
||||
int ret;
|
||||
|
||||
ret = regmap_read(state->regmaps[data->resetn_map], data->resetn_reg, &val);
|
||||
if (ret)
|
||||
return 0;
|
||||
|
||||
regmap_read(state->regmaps[data->resetn_map], data->resetn_reg, &val);
|
||||
return val & data->resetn_val;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user