aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/gpc.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2013-10-16 07:52:00 -0400
committerShawn Guo <shawn.guo@linaro.org>2013-10-20 21:39:26 -0400
commitd48866fefdac239a4e02777e712aad60db9ee8a8 (patch)
treebe0bb666ba9a8d0c29a262407e885ee91abb85e7 /arch/arm/mach-imx/gpc.c
parent1d674a73c59211cc33cb9c2954659033d8458fa9 (diff)
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/gpc.c')
-rw-r--r--arch/arm/mach-imx/gpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c
index 44a65e9ff1fc..586e0171a652 100644
--- a/arch/arm/mach-imx/gpc.c
+++ b/arch/arm/mach-imx/gpc.c
@@ -90,7 +90,7 @@ void imx_gpc_restore_all(void)
90 writel_relaxed(gpc_saved_imrs[i], reg_imr1 + i * 4); 90 writel_relaxed(gpc_saved_imrs[i], reg_imr1 + i * 4);
91} 91}
92 92
93static void imx_gpc_irq_unmask(struct irq_data *d) 93void imx_gpc_irq_unmask(struct irq_data *d)
94{ 94{
95 void __iomem *reg; 95 void __iomem *reg;
96 u32 val; 96 u32 val;
@@ -105,7 +105,7 @@ static void imx_gpc_irq_unmask(struct irq_data *d)
105 writel_relaxed(val, reg); 105 writel_relaxed(val, reg);
106} 106}
107 107
108static void imx_gpc_irq_mask(struct irq_data *d) 108void imx_gpc_irq_mask(struct irq_data *d)
109{ 109{
110 void __iomem *reg; 110 void __iomem *reg;
111 u32 val; 111 u32 val;