diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-10-30 21:46:17 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-11-11 09:58:45 -0500 |
commit | 43c9b9e8a4c64b1dd3026ab233703a4321ac6d7c (patch) | |
tree | 214c780126ea7b8507dcb3f1e33d0dc824874386 /arch/arm | |
parent | bc3b84da8a55752d8c54005e558d59ac10fe9953 (diff) |
ARM: imx: set up pllv3 POWER and BYPASS sequentially
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>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-imx/clk-pllv3.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/clk-pllv3.c b/arch/arm/mach-imx/clk-pllv3.c index df1736232961..61364050fccd 100644 --- a/arch/arm/mach-imx/clk-pllv3.c +++ b/arch/arm/mach-imx/clk-pllv3.c | |||
@@ -71,16 +71,24 @@ static int clk_pllv3_prepare(struct clk_hw *hw) | |||
71 | { | 71 | { |
72 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | 72 | struct clk_pllv3 *pll = to_clk_pllv3(hw); |
73 | u32 val; | 73 | u32 val; |
74 | int ret; | ||
74 | 75 | ||
75 | val = readl_relaxed(pll->base); | 76 | val = readl_relaxed(pll->base); |
76 | val &= ~BM_PLL_BYPASS; | ||
77 | if (pll->powerup_set) | 77 | if (pll->powerup_set) |
78 | val |= BM_PLL_POWER; | 78 | val |= BM_PLL_POWER; |
79 | else | 79 | else |
80 | val &= ~BM_PLL_POWER; | 80 | val &= ~BM_PLL_POWER; |
81 | writel_relaxed(val, pll->base); | 81 | writel_relaxed(val, pll->base); |
82 | 82 | ||
83 | return clk_pllv3_wait_lock(pll); | 83 | ret = clk_pllv3_wait_lock(pll); |
84 | if (ret) | ||
85 | return ret; | ||
86 | |||
87 | val = readl_relaxed(pll->base); | ||
88 | val &= ~BM_PLL_BYPASS; | ||
89 | writel_relaxed(val, pll->base); | ||
90 | |||
91 | return 0; | ||
84 | } | 92 | } |
85 | 93 | ||
86 | static void clk_pllv3_unprepare(struct clk_hw *hw) | 94 | static void clk_pllv3_unprepare(struct clk_hw *hw) |