diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2015-07-27 16:05:36 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-04-03 15:36:43 +0200 |
commit | 29ff2389ecf7cb4e30924c80b8d42165cf306936 (patch) | |
tree | 9663840e378c806c9d2d80e0f9a3619e14645404 /arch/arm | |
parent | 94a53ed03961218fb89fe10f58afaba0219ae1e8 (diff) |
colibri-imx6: use stopmode for poweroff
After the system has been shutdown with PMIC_ON_REQ and VCC_BATT is supplied
from a battery it will never restart either by RESET or power cycle.
So use the PMIC_STBY_REQ after shutdown to switch off power rails.
Conflicts:
arch/arm/mach-imx/pm-imx6.c
drivers/regulator/pfuze100-regulator.c
(cherry-picked from commit c8b186404065c4502b485820ad4a51515924795c)
(cherry-picked from commit ee4c5c4da3b32f65528a2d523ca4bce574dee3c5)
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-imx/pm-imx6.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c index 54621f1958db..3ef6310319ae 100644 --- a/arch/arm/mach-imx/pm-imx6.c +++ b/arch/arm/mach-imx/pm-imx6.c @@ -1170,6 +1170,12 @@ static void __init imx6_pm_common_init(const struct imx6_pm_socdata IMX6Q_GPR1_GINT); } +void imx6_stop_mode_poweroff(void) +{ + imx6q_set_lpm(STOP_POWER_OFF); + cpu_do_idle(); +} + void __init imx6q_pm_init(void) { if (imx_mmdc_get_ddr_type() == IMX_DDR_TYPE_LPDDR2) @@ -1181,6 +1187,16 @@ void __init imx6q_pm_init(void) void __init imx6dl_pm_init(void) { imx6_pm_common_init(&imx6dl_pm_data); + +#ifndef CONFIG_POWER_RESET_GPIO + /* + * if no specific power off function in board file, power off system by + * SNVS + */ + if (!pm_power_off) + if (of_machine_is_compatible("toradex,colibri_imx6dl")) + pm_power_off = imx6_stop_mode_poweroff; +#endif } void __init imx6sl_pm_init(void) |