Skip to content

Commit

Permalink
Merge tag 'phy-for-4.7-rc' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/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>
  • Loading branch information
Greg Kroah-Hartman committed Jun 11, 2016
2 parents 11c011a + 31b2a32 commit e4600d5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
6 changes: 5 additions & 1 deletion drivers/phy/phy-exynos-mipi-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
15 changes: 11 additions & 4 deletions drivers/phy/phy-ti-pipe3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e4600d5

Please sign in to comment.