Skip to content

Commit

Permalink
ARM: imx: set up pllv3 POWER and BYPASS sequentially
Browse files Browse the repository at this point in the history
Currently, POWER and BYPASS bits are set up in a single write to pllv3
register.  This causes problem occasionally from the IPU/HDMI testing.
Let's follow FSL BSP code to set up POWER bit, relock, and then BYPASS
sequentially.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
  • Loading branch information
Shawn Guo committed Nov 11, 2013
1 parent bc3b84d commit 43c9b9e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions arch/arm/mach-imx/clk-pllv3.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,24 @@ static int clk_pllv3_prepare(struct clk_hw *hw)
{
struct clk_pllv3 *pll = to_clk_pllv3(hw);
u32 val;
int ret;

val = readl_relaxed(pll->base);
val &= ~BM_PLL_BYPASS;
if (pll->powerup_set)
val |= BM_PLL_POWER;
else
val &= ~BM_PLL_POWER;
writel_relaxed(val, pll->base);

return clk_pllv3_wait_lock(pll);
ret = clk_pllv3_wait_lock(pll);
if (ret)
return ret;

val = readl_relaxed(pll->base);
val &= ~BM_PLL_BYPASS;
writel_relaxed(val, pll->base);

return 0;
}

static void clk_pllv3_unprepare(struct clk_hw *hw)
Expand Down

0 comments on commit 43c9b9e

Please sign in to comment.