diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-10-16 19:52:00 +0800 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-10-21 09:39:26 +0800 |
commit | d48866fefdac239a4e02777e712aad60db9ee8a8 (patch) | |
tree | be0bb666ba9a8d0c29a262407e885ee91abb85e7 /arch/arm/mach-imx/common.h | |
parent | 1d674a73c59211cc33cb9c2954659033d8458fa9 (diff) | |
download | blackbird-op-linux-d48866fefdac239a4e02777e712aad60db9ee8a8.tar.gz blackbird-op-linux-d48866fefdac239a4e02777e712aad60db9ee8a8.zip |
ARM: imx: ensure dsm_request signal is not asserted when setting LPM
There is a defect in imx6 LPM design. When SW tries to enter low power
mode with following sequence, the chip will enter low power mode before
A9 CPU execute WFI instruction:
1. Set CCM_CLPCR[1:0] to 2'b00;
2. ARM CPU enters WFI;
3. ARM CPU wakeup from an interrupt event, which is masked by GPC or not
visible to GPC, such as interrupt from local timer;
4. Set CCM_CLPCR[1:0] to 2'b01 or 2'b10;
5. ARM CPU execute WFI.
Before the last step, the chip will enter WAIT mode if CCM_CLPCR[1:0] is
set to 2'b01, or enter STOP mode if CCM_CLPCR[1:0] is set to 2'b10.
The patch implements a recommended workaround for this issue.
1. SW triggers irq #32(IOMUX) to be always pending manually by setting
IOMUX_GPR1_GINT bit;
2. SW should then unmask it in GPC before setting CCM LPM;
3. SW should mask it right after CCM LPM is set (bit0-1 of CCM_CLPCR).
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/common.h')
-rw-r--r-- | arch/arm/mach-imx/common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index fde6661ef70d..7cbe22d0c6e9 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h @@ -13,6 +13,7 @@ #include <linux/reboot.h> +struct irq_data; struct platform_device; struct pt_regs; struct clk; @@ -136,6 +137,8 @@ void imx_gpc_pre_suspend(void); void imx_gpc_post_resume(void); void imx_gpc_mask_all(void); void imx_gpc_restore_all(void); +void imx_gpc_irq_mask(struct irq_data *d); +void imx_gpc_irq_unmask(struct irq_data *d); void imx_anatop_init(void); void imx_anatop_pre_suspend(void); void imx_anatop_post_resume(void); |