aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-12-11 04:08:50 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2012-12-17 04:51:45 -0500
commit69155fd66d340d47cf25eff0099b3e13548ed50c (patch)
treef2f47e678ca79af8f8de66cc2a1c0e53f27921df /arch/arm/mach-imx
parent3e24b05ba3be5281c3fbf0b126953f5810f9d8ab (diff)
ARM i.MX51 clock: Fix regression since enabling MIPI/HSP clocks
The MIPI/HSP clocks were recently turned on in the i.MX51 clock tree. It turned out that the system does not work properly when the MIPI/HSP clocks are enabled, but the IPU clock is disabled. This happens when IPU support is disabled. In this case the IPU clock gets disabled when the clock framework turns off unused clock in a late_initcall. This is broken since: | commit 9a2d4825a9368e018003a2732a61be063d178f67 | Author: Sascha Hauer <s.hauer@pengutronix.de> | Date: Tue Jun 5 13:53:32 2012 +0200 | | ARM i.MX5: switch IPU clk support to devicetree bindings | | The i.MX5 clk support has platform based clock bindings for the | IPU. IPU support is devicetree only, so move them over to devicetree | based bindings. Also, enable MIPI clocks which do not have a device | associated with, but still need to be enabled to do graphics on | i.MX51. This patch fixes this by setting some reserved bits in the CCM as recommended in the reference manual. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/clk-imx51-imx53.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c
index e8c0473c7568..579023f59dc1 100644
--- a/arch/arm/mach-imx/clk-imx51-imx53.c
+++ b/arch/arm/mach-imx/clk-imx51-imx53.c
@@ -319,6 +319,7 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
319 unsigned long rate_ckih1, unsigned long rate_ckih2) 319 unsigned long rate_ckih1, unsigned long rate_ckih2)
320{ 320{
321 int i; 321 int i;
322 u32 val;
322 struct device_node *np; 323 struct device_node *np;
323 324
324 clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX51_DPLL1_BASE); 325 clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX51_DPLL1_BASE);
@@ -390,6 +391,21 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
390 imx_print_silicon_rev("i.MX51", mx51_revision()); 391 imx_print_silicon_rev("i.MX51", mx51_revision());
391 clk_disable_unprepare(clk[iim_gate]); 392 clk_disable_unprepare(clk[iim_gate]);
392 393
394 /*
395 * Reference Manual says: Functionality of CCDR[18] and CLPCR[23] is no
396 * longer supported. Set to one for better power saving.
397 *
398 * The effect of not setting these bits is that MIPI clocks can't be
399 * enabled without the IPU clock being enabled aswell.
400 */
401 val = readl(MXC_CCM_CCDR);
402 val |= 1 << 18;
403 writel(val, MXC_CCM_CCDR);
404
405 val = readl(MXC_CCM_CLPCR);
406 val |= 1 << 23;
407 writel(val, MXC_CCM_CLPCR);
408
393 return 0; 409 return 0;
394} 410}
395 411