diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2017-03-28 16:11:05 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-12-21 14:27:44 +0100 |
commit | ee1c27d7d124ba463ddb7ab1d0333dde85d7fbfa (patch) | |
tree | fa932ca2377813ec0f99bfbe61b59f141d593a57 /arch/arm/mach-imx | |
parent | 23de9e55818a92c7158c0a9e9a04c00c632d1ada (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 928235a2e13e..485c1e9b94a8 100644 --- a/arch/arm/mach-imx/pm-imx6.c +++ b/arch/arm/mach-imx/pm-imx6.c @@ -1272,8 +1272,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; @@ -1293,6 +1300,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) @@ -1302,7 +1318,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")) |