From: Russell King Date: Fri, 3 Feb 2012 19:05:13 +0000 (+0000) Subject: ARM: sa1111: fix PWM state on suspend X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a22db0f38243f68957c89b1b9689a2064507bed6;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ARM: sa1111: fix PWM state on suspend We should not write to the SA1111 registers after setting the SLEEP bit. Moreover, the manual says that the PWM registers should be disabled before we enter sleep. So, move the clearing of these registers earlier in the suspend sequence. Acked-by: Nicolas Pitre Signed-off-by: Russell King --- diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index c7bed309b3aa..f0d9faadcc3f 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -905,6 +905,9 @@ static int sa1111_suspend(struct platform_device *dev, pm_message_t state) save->skpwm0 = sa1111_readl(base + SA1111_SKPWM0); save->skpwm1 = sa1111_readl(base + SA1111_SKPWM1); + sa1111_writel(0, sachip->base + SA1111_SKPWM0); + sa1111_writel(0, sachip->base + SA1111_SKPWM1); + base = sachip->base + SA1111_INTC; save->intpol0 = sa1111_readl(base + SA1111_INTPOL0); save->intpol1 = sa1111_readl(base + SA1111_INTPOL1); @@ -920,8 +923,6 @@ static int sa1111_suspend(struct platform_device *dev, pm_message_t state) */ val = sa1111_readl(sachip->base + SA1111_SKCR); sa1111_writel(val | SKCR_SLEEP, sachip->base + SA1111_SKCR); - sa1111_writel(0, sachip->base + SA1111_SKPWM0); - sa1111_writel(0, sachip->base + SA1111_SKPWM1); clk_disable(sachip->clk);