summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2015-07-27 16:05:36 +0200
committerPhilippe Schenker <philippe.schenker@toradex.com>2019-05-24 11:34:15 +0200
commit85a109565fe87ed7bda2acf108822da55b5fe497 (patch)
tree2a571e52623eac4d9427382cee3e4e6e72b31b58 /arch/arm/mach-imx
parentdea646feb932f7c4d5861402bd5d68b71a25339a (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> (cherry picked from commit 29ff2389ecf7cb4e30924c80b8d42165cf306936)
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/pm-imx6.c16
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 5d0a7c3f6114..567193d3936f 100644
--- a/arch/arm/mach-imx/pm-imx6.c
+++ b/arch/arm/mach-imx/pm-imx6.c
@@ -1290,6 +1290,12 @@ void __init imx6_pm_ccm_init(const char *ccm_compat)
writel_relaxed(val, ccm_base + CLPCR);
}
+void imx6_stop_mode_poweroff(void)
+{
+ imx6_set_lpm(STOP_POWER_OFF);
+ cpu_do_idle();
+}
+
void __init imx6q_pm_init(void)
{
if (imx_mmdc_get_ddr_type() == IMX_DDR_TYPE_LPDDR2)
@@ -1301,6 +1307,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)