summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/mx3x.h
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2015-04-29 13:07:03 +0800
committerShawn Guo <shawn.guo@linaro.org>2015-06-03 14:49:18 +0800
commit35e2916f70e3be767c5c8ef6cc80bc5398b8914c (patch)
tree9168d5d7f16b86fb402f3d521adf1efd770f04c9 /arch/arm/mach-imx/mx3x.h
parentde8e434d09f253369621e994da1833703c5c51d6 (diff)
ARM: imx6: initialize CCM_CLPCR_LPM into RUN mode earlier
Commit 4631960d26da ("ARM: imx6: set initial power mode in pm function") moves imx6_set_lpm() from clock init function into imx6_pm_common_init(). This causes a hang when cpuidle support is enabled. The reason for that is ARM core clock is shut down unexpectedly by WAIT mode. It happens with the following call stack: cpuidle_register_governor() cpuidle_switch_governor() cpuidle_uninstall_idle_handler() synchronize_sched() wait_rcu_gp() wait_for_completion() When wait_for_completion() is called as above, all cores are idle/WFI. Hence, the reset value of CCM_CLPCR_LPM - WAIT mode, will trigger a hardware shutdown of the ARM core clock. To fix the regression, we need to ensure that CCM_CLPCR_LPM is initialized into RUN mode earlier than cpuidle governor registration, which is a postcore_initcall. This patch creates function imx6_pm_ccm_init() to map CCM block and initialize CCM_CLPCR_LPM into RUN mode, and have the function called from machine .init_irq hook, which should be early enough. Reported-by: Kevin Hilman <khilman@kernel.org> Fixes: 8fb76a07e2cb ("ARM: imx6: set initial power mode in pm function") Tested-by: Kevin Hilman <khilman@linaro.org> Tested-by: Tyler Baker <tyler.baker@linaro.org> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/mx3x.h')
0 files changed, 0 insertions, 0 deletions