linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/20] ARM: sa1111: fix PWM state on suspend
Date: Fri, 03 Feb 2012 19:55:14 +0000	[thread overview]
Message-ID: <E1RtPE2-00043c-H6@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20120203195419.GH14129@n2100.arm.linux.org.uk>

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.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/common/sa1111.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index c7bed30..f0d9faa 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);
 
-- 
1.7.4.4

  parent reply	other threads:[~2012-02-03 19:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03 19:54 [PATCH 00/20] SA1111 cleanups Russell King - ARM Linux
2012-02-03 19:54 ` [PATCH 01/20] ARM: sa1111: fix memory request/grant setup on PM events Russell King - ARM Linux
2012-02-03 19:55 ` Russell King - ARM Linux [this message]
2012-02-03 19:55 ` [PATCH 03/20] ARM: sa1111: add sa1111 core driver .owner initializer Russell King - ARM Linux
2012-02-03 19:55 ` [PATCH 04/20] ARM: sa1111: add .owner initializer to sa1111 driver structures Russell King - ARM Linux
2012-02-03 19:56 ` [PATCH 05/20] ARM: sa1111: finish "allow cascaded IRQs to be used by platforms" Russell King - ARM Linux
2012-02-03 19:56 ` [PATCH 06/20] ARM: sa1111: implement support for sparse IRQs Russell King - ARM Linux
2012-02-03 19:56 ` [PATCH 07/20] ARM: sa1111: add shutdown hook to sa1111_driver structure Russell King - ARM Linux
2012-02-03 19:57 ` [PATCH 08/20] ARM: sa1111: add platform enable/disable functions Russell King - ARM Linux
2012-02-03 19:57 ` [PATCH 09/20] ARM: sa11x0: badge4: move board specific ohci initialization to badge4.c Russell King - ARM Linux
2012-02-03 19:57 ` [PATCH 10/20] ARM: sa1111: change devid to be a bitmask Russell King - ARM Linux
2012-02-03 19:58 ` [PATCH 11/20] ARM: sa1111: provide a generic way to prevent devices from registering Russell King - ARM Linux
2012-02-03 19:58 ` [PATCH 12/20] ARM: sa1111: delete unused physical GPIO register definitions Russell King - ARM Linux
2012-02-03 19:58 ` [PATCH 13/20] ARM: sa1111: move PS/2 interface register definitions to sa1111p2.c Russell King - ARM Linux
2012-02-03 19:59 ` [PATCH 14/20] ARM: sa1111: move PCMCIA interface register definitions to sa1111_generic.c Russell King - ARM Linux
2012-02-03 19:59 ` [PATCH 15/20] ARM: sa1111: move USB interface register definitions to ohci-sa1111.c Russell King - ARM Linux
2012-02-03 19:59 ` [PATCH 16/20] ARM: sa1111: register sa1111 devices with dmabounce in bus notifier Russell King - ARM Linux
2012-02-03 20:00 ` [PATCH 17/20] ARM: sa1111: only setup DMA for DMA capable devices Russell King - ARM Linux
2012-02-03 20:00 ` [PATCH 18/20] ARM: sa1111: cleanup sub-device registration and unregistration Russell King - ARM Linux
2012-02-03 20:00 ` [PATCH 19/20] ARM: sa1111: use dev_err() rather than printk() Russell King - ARM Linux
2012-02-03 20:01 ` [PATCH 20/20] ARM: sa11x0: don't static map sa1111 Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1RtPE2-00043c-H6@rmk-PC.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).