linux/arch/arm/mach-imx
Shawn Guo 35e2916f70 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: 8fb76a07e2 ("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>
2015-06-03 14:49:18 +08:00
..
devices ARM: mx25: Remove imxdi_rtc platform code 2015-03-13 22:14:58 +08:00
3ds_debugboard.c
3ds_debugboard.h
anatop.c ARM: imx: add anatop settings for LPDDR2 when enter DSM mode 2014-11-23 14:56:17 +08:00
avic.c ARM: imx: avic: Convert to handle_domain_irq 2014-09-03 13:10:56 +00:00
board-mx31lilly.h
board-mx31lite.h
board-mx31moboard.h
common.h ARM: imx6: initialize CCM_CLPCR_LPM into RUN mode earlier 2015-06-03 14:49:18 +08:00
cpu-imx5.c ARM: imx5: retrieve iim base from device tree 2014-07-18 16:10:07 +08:00
cpu-imx25.c ARM: mx25: Retrieve IIM base from dt 2015-03-13 22:06:35 +08:00
cpu-imx27.c
cpu-imx31.c
cpu-imx35.c
cpu.c ARM: i.MX: allow disabling supervisor protect via DT 2014-07-18 16:11:39 +08:00
cpuidle-imx5.c cpuidle: Invert CPUIDLE_FLAG_TIME_VALID logic 2014-11-12 21:17:27 +01:00
cpuidle-imx6q.c ARM: imx6: set initial power mode in pm function 2015-06-03 14:44:31 +08:00
cpuidle-imx6sl.c ARM: imx6: set initial power mode in pm function 2015-06-03 14:44:31 +08:00
cpuidle-imx6sx.c ARM: imx6: set initial power mode in pm function 2015-06-03 14:44:31 +08:00
cpuidle.h ARM: imx: support arm power off in cpuidle for i.mx6sx 2015-01-05 21:34:29 +08:00
crmregs-imx3.h
devices-imx1.h
devices-imx21.h
devices-imx27.h
devices-imx31.h
devices-imx35.h ARM: imx: prepare for removal of flexcan_platform_data 2013-06-27 15:15:08 +02:00
ehci-imx27.c ARM: imx: move EHCI platform defines out of platform_data header 2014-07-18 16:10:04 +08:00
ehci-imx31.c ARM: imx: move EHCI platform defines out of platform_data header 2014-07-18 16:10:04 +08:00
ehci-imx35.c ARM: imx: move EHCI platform defines out of platform_data header 2014-07-18 16:10:04 +08:00
ehci.h ARM: imx5: remove imx51 non-DT support files 2014-07-18 16:10:05 +08:00
epit.c ARM: imx: remove IRQF_DISABLED 2013-10-21 09:11:05 +08:00
eukrea_mbimxsd35-baseboard.c ARM: imx/iomux-v3: allow pad_list to be const 2015-03-03 12:04:41 +08:00
eukrea-baseboards.h ARM: i.MX: Remove mach-cpuimx27sd board file 2014-09-01 22:00:01 +08:00
gpc.c ARM: imx6: Warn when an old DT is detected 2015-03-30 16:43:51 +08:00
hardware.h ARM: imx: move revision definitions and declarations into a header 2015-06-03 14:44:30 +08:00
headsmp.S ARM: imx6: drop .text.head section annotation from headsmp.S 2014-03-05 10:48:26 +08:00
hotplug.c ARM: imx: do not return from imx_cpu_die() call 2013-10-21 09:37:31 +08:00
iim.h
imx1-dt.c ARM: i.MX1: Add devicetree support 2014-09-16 10:06:44 +08:00
imx27-dt.c ARM: imx: clean up machine mxc_arch_reset_init_dt reset init 2014-11-22 07:39:36 +08:00
imx31-dt.c ARM: imx: clean up machine mxc_arch_reset_init_dt reset init 2014-11-22 07:39:36 +08:00
imx35-dt.c ARM: imx: clean up machine mxc_arch_reset_init_dt reset init 2014-11-22 07:39:36 +08:00
iomux-imx31.c ARM: imx: refactor mxc_iomux_mode() 2014-11-22 07:39:36 +08:00
iomux-mx1.h
iomux-mx2x.h
iomux-mx3.h ARM: imx: Fix trivial typo in comments 2015-03-03 12:05:46 +08:00
iomux-mx21.h
iomux-mx27.h
iomux-mx35.h
iomux-v1.c ARM: imx: iomux: Do not export symbol without public declaration 2014-09-01 22:00:01 +08:00
iomux-v1.h
iomux-v3.c ARM: imx/iomux-v3: allow pad_list to be const 2015-03-03 12:04:41 +08:00
iomux-v3.h ARM: imx: Fix trivial typo in comments 2015-03-03 12:05:46 +08:00
irq-common.c ARM: imx: irq-common: Include header to avoid sparse warning 2013-06-17 15:45:14 +08:00
irq-common.h ARM: imx: drop support for irq priorisation 2013-12-09 13:18:25 +08:00
Kconfig ARM: SoC platform updates for v4.1 2015-04-22 09:08:39 -07:00
mach-apf9328.c ARM: i.MX: Setup IRQ handler from IRQ driver 2014-05-12 22:58:51 +08:00
mach-armadillo5x0.c arm: mach-imx: Convert pr_warning to pr_warn 2014-09-16 10:09:41 +08:00
mach-bug.c ARM: i.MX: Setup IRQ handler from IRQ driver 2014-05-12 22:58:51 +08:00
mach-cpuimx35.c ARM: imx/iomux-v3: allow pad_list to be const 2015-03-03 12:04:41 +08:00
mach-imx6q.c ARM: imx6: initialize CCM_CLPCR_LPM into RUN mode earlier 2015-06-03 14:49:18 +08:00
mach-imx6sl.c ARM: imx6: initialize CCM_CLPCR_LPM into RUN mode earlier 2015-06-03 14:49:18 +08:00
mach-imx6sx.c ARM: imx6: initialize CCM_CLPCR_LPM into RUN mode earlier 2015-06-03 14:49:18 +08:00
mach-imx25.c ARM: mx25: Remove static memory mapping 2015-03-13 22:14:57 +08:00
mach-imx27_visstrim_m10.c ARM: imx: move EHCI platform defines out of platform_data header 2014-07-18 16:10:04 +08:00
mach-imx50.c ARM: imx: clean up machine mxc_arch_reset_init_dt reset init 2014-11-22 07:39:36 +08:00
mach-imx51.c ARM: imx: clean up machine mxc_arch_reset_init_dt reset init 2014-11-22 07:39:36 +08:00
mach-imx53.c ARM: SoC platform changes for 3.19 2014-12-09 14:38:28 -08:00
mach-kzm_arm11_01.c ARM: i.MX: Setup IRQ handler from IRQ driver 2014-05-12 22:58:51 +08:00
mach-ls1021a.c ARM: imx: Add Freescale LS1021A SMP support 2014-11-23 14:56:21 +08:00
mach-mx21ads.c ARM: i.MX: Setup IRQ handler from IRQ driver 2014-05-12 22:58:51 +08:00
mach-mx27_3ds.c ARM: imx: move EHCI platform defines out of platform_data header 2014-07-18 16:10:04 +08:00
mach-mx27ads.c platform: Remove most references to platform_bus device 2014-07-23 19:09:03 -07:00
mach-mx31_3ds.c arm: mach-imx: Convert pr_warning to pr_warn 2014-09-16 10:09:41 +08:00
mach-mx31ads.c ARM: i.MX: Setup IRQ handler from IRQ driver 2014-05-12 22:58:51 +08:00
mach-mx31lilly.c ARM: imx: move EHCI platform defines out of platform_data header 2014-07-18 16:10:04 +08:00
mach-mx31lite.c arm: mach-imx: Convert pr_warning to pr_warn 2014-09-16 10:09:41 +08:00
mach-mx31moboard.c ARM: imx: use PTR_ERR_OR_ZERO 2014-07-18 16:11:36 +08:00
mach-mx35_3ds.c ARM: imx/iomux-v3: allow pad_list to be const 2015-03-03 12:04:41 +08:00
mach-pca100.c ARM: imx: move EHCI platform defines out of platform_data header 2014-07-18 16:10:04 +08:00
mach-pcm037_eet.c
mach-pcm037.c arm: mach-imx: Convert pr_warning to pr_warn 2014-09-16 10:09:41 +08:00
mach-pcm043.c ARM: imx/iomux-v3: allow pad_list to be const 2015-03-03 12:04:41 +08:00
mach-qong.c ARM: i.MX: Setup IRQ handler from IRQ driver 2014-05-12 22:58:51 +08:00
mach-scb9328.c ARM: i.MX: Setup IRQ handler from IRQ driver 2014-05-12 22:58:51 +08:00
mach-vf610.c ARM vf610: add compatibilty strings of supported Vybrid SoC's 2015-01-05 20:53:05 +08:00
mach-vpr200.c ARM: imx/iomux-v3: allow pad_list to be const 2015-03-03 12:04:41 +08:00
Makefile ARM: imx: move clock drivers into drivers/clk 2015-06-03 14:44:33 +08:00
mm-imx1.c ARM: imx: move clk_prepare() out from mxc_restart() 2013-06-17 15:45:10 +08:00
mm-imx3.c Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-07-03 09:46:29 -07:00
mm-imx21.c ARM: imx: move clk_prepare() out from mxc_restart() 2013-06-17 15:45:10 +08:00
mm-imx27.c ARM: imx: move clk_prepare() out from mxc_restart() 2013-06-17 15:45:10 +08:00
mmdc.c ARM: make of_device_ids const 2015-02-19 09:44:25 +01:00
mx1.h
mx2x.h
mx3x.h ARM: imx: move revision definitions and declarations into a header 2015-06-03 14:44:30 +08:00
mx21.h
mx27.h ARM: imx: move revision definitions and declarations into a header 2015-06-03 14:44:30 +08:00
mx31.h
mx31lilly-db.c ARM: imx: remove IRQF_DISABLED 2013-10-21 09:11:05 +08:00
mx31lite-db.c
mx31moboard-devboard.c ARM: imx: use PTR_ERR_OR_ZERO 2014-07-18 16:11:36 +08:00
mx31moboard-marxbot.c ARM: imx: use PTR_ERR_OR_ZERO 2014-07-18 16:11:36 +08:00
mx31moboard-smartbot.c ARM: imx: use PTR_ERR_OR_ZERO 2014-07-18 16:11:36 +08:00
mx35.h
mxc.h ARM: imx: move revision definitions and declarations into a header 2015-06-03 14:44:30 +08:00
pcm037.h
platsmp.c ARM: imx: Add Freescale LS1021A SMP support 2014-11-23 14:56:21 +08:00
pm-imx3.c
pm-imx5.c ARM: imx5: let pm code map CCM block on its own 2015-06-03 14:44:30 +08:00
pm-imx6.c ARM: imx6: initialize CCM_CLPCR_LPM into RUN mode earlier 2015-06-03 14:49:18 +08:00
pm-imx27.c
src.c ARM: imx: remove imx_src_prepare_restart() call 2013-11-11 22:58:43 +08:00
ssi-fiq-ksym.c
ssi-fiq.S
suspend-imx6.S ARM: imx: replace cpu type check with ddr type check 2014-11-23 14:56:17 +08:00
system.c ARM: imx: clean up machine mxc_arch_reset_init_dt reset init 2014-11-22 07:39:36 +08:00
time.c ARM: imx: use dynamic mapping for timer 2015-06-03 14:44:29 +08:00
tzic.c ARM: imx: tzic: Convert to handle_domain_irq 2014-09-03 13:10:57 +00:00
ulpi.h ARM: imx: Remove mxc specific ulpi access ops 2013-06-17 15:45:16 +08:00