diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2017-03-28 16:11:05 +0200 |
---|---|---|
committer | Philippe Schenker <philippe.schenker@toradex.com> | 2019-05-24 11:34:15 +0200 |
commit | c1605f998aa7e5532ef1e000662a45f49546de89 (patch) | |
tree | 1951caa3620611bbaa942510e547bcf398916834 /arch/arm/mach-imx | |
parent | 323869efaca08ced51ac242aae21fb5f117ce17e (diff) |
apalis-imx6: use stopmode for poweroff
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
(cherry picked from commit 051ee1a1c24058db62f10a177b1271daebbd2ebe)
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/pm-imx6.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c index 68cfb96ecf22..3e34cae5d4b2 100644 --- a/arch/arm/mach-imx/pm-imx6.c +++ b/arch/arm/mach-imx/pm-imx6.c @@ -1296,8 +1296,15 @@ void imx6_stop_mode_poweroff(void) u32 val = readl_relaxed(ccm_base + CLPCR); val &= ~BM_CLPCR_LPM; - /* mask the stopped processor, otherwise we will not enter stop mode */ - val |= smp_processor_id() ? BM_CLPCR_MASK_CORE0_WFI : BM_CLPCR_MASK_CORE1_WFI; + /* + * mask all but the currently running processor, + * otherwise we will not enter stop mode + */ + val |= smp_processor_id() != 0 ? BM_CLPCR_MASK_CORE0_WFI : 0; + val |= smp_processor_id() != 1 ? BM_CLPCR_MASK_CORE1_WFI : 0; + val |= smp_processor_id() != 2 ? BM_CLPCR_MASK_CORE2_WFI : 0; + val |= smp_processor_id() != 3 ? BM_CLPCR_MASK_CORE3_WFI : 0; + val |= BM_CLPCR_MASK_SCU_IDLE; val |= 0x2 << BP_CLPCR_LPM; val |= 0x3 << BP_CLPCR_STBY_COUNT; val |= BM_CLPCR_VSTBY; @@ -1317,6 +1324,15 @@ void __init imx6q_pm_init(void) imx6_pm_common_init(&imx6q_lpddr2_pm_data); else imx6_pm_common_init(&imx6q_pm_data); +#ifndef CONFIG_POWER_RESET_GPIO + /* + * if no specific power off function in board file, power off system by + * stop mode + */ + if (!pm_power_off) + if (of_machine_is_compatible("toradex,apalis_imx6q")) + pm_power_off = imx6_stop_mode_poweroff; +#endif } void __init imx6dl_pm_init(void) @@ -1326,7 +1342,7 @@ void __init imx6dl_pm_init(void) #ifndef CONFIG_POWER_RESET_GPIO /* * if no specific power off function in board file, power off system by - * SNVS + * stop mode */ if (!pm_power_off) if (of_machine_is_compatible("toradex,colibri_imx6dl")) |