summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2015-12-12 10:07:31 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2015-12-26 14:55:38 +0100
commit2acff0eaece38533e85e08431e7ae9f3027c677a (patch)
tree11c4e04b60c20809dff5bf64cf5106ff6ab9108b /arch
parent8d35764ee16976d81ac7dd0b75b3c0b11f977ad1 (diff)
pm-imx6.c: fix power off by stop mode
With the 3.14.28 release of the kernel imx6_stop_mode_poweroff() does not enter stop mode. Thus the function does not switch of power but returns. This seems to be caused by the second processor which has been stopped. Set the WFI event mask for the stopped processor works around the issue. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/pm-imx6.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c
index eb4e96cbf12c..1324cc8d897c 100644
--- a/arch/arm/mach-imx/pm-imx6.c
+++ b/arch/arm/mach-imx/pm-imx6.c
@@ -1166,7 +1166,24 @@ void __init imx6q_pm_init(void)
void imx6_stop_mode_poweroff(void)
{
- imx6q_set_lpm(STOP_POWER_OFF);
+ struct irq_desc *iomuxc_irq_desc;
+ 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;
+ val |= 0x2 << BP_CLPCR_LPM;
+ val |= 0x3 << BP_CLPCR_STBY_COUNT;
+ val |= BM_CLPCR_VSTBY;
+ val |= BM_CLPCR_SBYOS;
+ val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS;
+
+ iomuxc_irq_desc = irq_to_desc(32);
+ imx_gpc_irq_unmask(&iomuxc_irq_desc->irq_data);
+ writel_relaxed(val, ccm_base + CLPCR);
+
+ imx_gpc_irq_mask(&iomuxc_irq_desc->irq_data);
+ imx_gpc_mask_all();
cpu_do_idle();
}