aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-02-03 14:05:13 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-02-09 10:34:48 -0500
commita22db0f38243f68957c89b1b9689a2064507bed6 (patch)
treebf6f6c2b19f247a46c12b943aa8d09d108f49c6b /arch/arm/common
parent29c140b623ce2c55131c6d1c26a2f3e455723b81 (diff)
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 <nico@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common')
-rw-r--r--arch/arm/common/sa1111.c5
1 files changed, 3 insertions, 2 deletions
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)
905 save->skpwm0 = sa1111_readl(base + SA1111_SKPWM0); 905 save->skpwm0 = sa1111_readl(base + SA1111_SKPWM0);
906 save->skpwm1 = sa1111_readl(base + SA1111_SKPWM1); 906 save->skpwm1 = sa1111_readl(base + SA1111_SKPWM1);
907 907
908 sa1111_writel(0, sachip->base + SA1111_SKPWM0);
909 sa1111_writel(0, sachip->base + SA1111_SKPWM1);
910
908 base = sachip->base + SA1111_INTC; 911 base = sachip->base + SA1111_INTC;
909 save->intpol0 = sa1111_readl(base + SA1111_INTPOL0); 912 save->intpol0 = sa1111_readl(base + SA1111_INTPOL0);
910 save->intpol1 = sa1111_readl(base + SA1111_INTPOL1); 913 save->intpol1 = sa1111_readl(base + SA1111_INTPOL1);
@@ -920,8 +923,6 @@ static int sa1111_suspend(struct platform_device *dev, pm_message_t state)
920 */ 923 */
921 val = sa1111_readl(sachip->base + SA1111_SKCR); 924 val = sa1111_readl(sachip->base + SA1111_SKCR);
922 sa1111_writel(val | SKCR_SLEEP, sachip->base + SA1111_SKCR); 925 sa1111_writel(val | SKCR_SLEEP, sachip->base + SA1111_SKCR);
923 sa1111_writel(0, sachip->base + SA1111_SKPWM0);
924 sa1111_writel(0, sachip->base + SA1111_SKPWM1);
925 926
926 clk_disable(sachip->clk); 927 clk_disable(sachip->clk);
927 928