Commit 83ae20981ae924c37d02a42c829155fc3851260c

Authored by Shawn Guo
1 parent 8375766421

ARM: imx: correct low-power mode setting

The hardware reset value of bit CCM_CLPCR_LPM enables WAIT mode
(WAIT_UNCLOCKED) by default.  However this is undesirable because
WAIT mode should only be enabled when there is a driver managing
ARM clock gating.  Correct the initial power mode to WAIT_CLOCKED
(disable WAIT mode).  While at it, the power mode after resuming
is also set back to WAIT_CLOCKED from STOP_POWER_OFF.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

Showing 2 changed files with 4 additions and 0 deletions Side-by-side Diff

arch/arm/mach-imx/clk-imx6q.c
... ... @@ -436,6 +436,9 @@
436 436 for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
437 437 clk_prepare_enable(clk[clks_init_on[i]]);
438 438  
  439 + /* Set initial power mode */
  440 + imx6q_set_lpm(WAIT_CLOCKED);
  441 +
439 442 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt");
440 443 base = of_iomap(np, 0);
441 444 WARN_ON(!base);
arch/arm/mach-imx/pm-imx6q.c
... ... @@ -41,6 +41,7 @@
41 41 cpu_suspend(0, imx6q_suspend_finish);
42 42 imx_smp_prepare();
43 43 imx_gpc_post_resume();
  44 + imx6q_set_lpm(WAIT_CLOCKED);
44 45 break;
45 46 default:
46 47 return -EINVAL;