diff options
author | Jason Liu <jason.hui@linaro.org> | 2011-08-05 23:34:32 +0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-08-05 18:10:19 +0200 |
commit | e1b96ada659431669efaf3defa997abf5db68130 (patch) | |
tree | 012b116f890cf80c13720fc42276261e06674485 /arch/arm/mach-mx5 | |
parent | 2012d9ca2a1381ae3e733330a7f0d1d2f1988bba (diff) | |
download | blackbird-obmc-linux-e1b96ada659431669efaf3defa997abf5db68130.tar.gz blackbird-obmc-linux-e1b96ada659431669efaf3defa997abf5db68130.zip |
ARM: iMX5: Don't enable DPLL if it already enabled
If the DPLL is already enabled, don't try to enable it again.
Since write to the DPLL control register will make the DPLL
reset and which will cause some issues when some child module
are sourced from this DPLL.
Signed-off-by: Jason Liu <jason.hui@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx5')
-rw-r--r-- | arch/arm/mach-mx5/clock-mx51-mx53.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c index 6b89c1bf4eb2..0856482f376d 100644 --- a/arch/arm/mach-mx5/clock-mx51-mx53.c +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c @@ -271,7 +271,11 @@ static int _clk_pll_enable(struct clk *clk) int i = 0; pllbase = _get_pll_base(clk); - reg = __raw_readl(pllbase + MXC_PLL_DP_CTL) | MXC_PLL_DP_CTL_UPEN; + reg = __raw_readl(pllbase + MXC_PLL_DP_CTL); + if (reg & MXC_PLL_DP_CTL_UPEN) + return 0; + + reg |= MXC_PLL_DP_CTL_UPEN; __raw_writel(reg, pllbase + MXC_PLL_DP_CTL); /* Wait for lock */ |