linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: anarsoul@gmail.com (Vasily Khoruzhick)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: PXA27x: save/restore PWER on suspend/resume
Date: Sun, 26 Feb 2012 16:47:41 +0300	[thread overview]
Message-ID: <1330264062-5750-2-git-send-email-anarsoul@gmail.com> (raw)
In-Reply-To: <1330264062-5750-1-git-send-email-anarsoul@gmail.com>

Bootloader can clobber PWER value, so save it state on suspend.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 arch/arm/mach-pxa/pxa27x.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index acbaa2b..2951872 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -262,6 +262,7 @@ enum {
 	SLEEP_SAVE_PSTR,
 	SLEEP_SAVE_MDREFR,
 	SLEEP_SAVE_PCFR,
+	SLEEP_SAVE_PWER,
 	SLEEP_SAVE_COUNT
 };
 
@@ -269,7 +270,7 @@ void pxa27x_cpu_pm_save(unsigned long *sleep_save)
 {
 	sleep_save[SLEEP_SAVE_MDREFR] = __raw_readl(MDREFR);
 	SAVE(PCFR);
-
+	SAVE(PWER);
 	SAVE(PSTR);
 }
 
@@ -281,6 +282,7 @@ void pxa27x_cpu_pm_restore(unsigned long *sleep_save)
 	PSSR = PSSR_RDH | PSSR_PH;
 
 	RESTORE(PSTR);
+	RESTORE(PWER);
 }
 
 void pxa27x_cpu_pm_enter(suspend_state_t state)
-- 
1.7.9.2

  reply	other threads:[~2012-02-26 13:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-26 13:47 [PATCH 1/3] ARM: PXA: Zipit Z2: Fix oops in z2_power_off Vasily Khoruzhick
2012-02-26 13:47 ` Vasily Khoruzhick [this message]
2012-02-26 14:27   ` [PATCH 2/3] ARM: PXA27x: save/restore PWER on suspend/resume Russell King - ARM Linux
2012-02-26 14:55     ` Vasily Khoruzhick
2012-02-26 15:26       ` Russell King - ARM Linux
2012-02-26 22:20     ` Marek Vasut
2012-02-26 23:36       ` Russell King - ARM Linux
2012-02-26 23:47         ` Marek Vasut
2012-02-27  0:18           ` Russell King - ARM Linux
2012-02-27  0:40             ` Marek Vasut
2012-02-26 13:47 ` [PATCH 3/3] ARM: PXA27x: Zipit Z2: disable wake on GPIO0 Vasily Khoruzhick
2012-02-26 14:26   ` Russell King - ARM Linux
2012-02-26 15:11     ` Vasily Khoruzhick
2012-02-26 15:29       ` Russell King - ARM Linux
2012-02-26 15:35         ` Vasily Khoruzhick
2012-02-26 22:21           ` Marek Vasut
2012-02-26 23:35             ` Russell King - ARM Linux
2012-02-26 23:47               ` Marek Vasut

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=1330264062-5750-2-git-send-email-anarsoul@gmail.com \
    --to=anarsoul@gmail.com \
    --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).