From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Linux-sh list" <linux-sh@vger.kernel.org>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Magnus Damm <magnus.damm@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: [Update][PATCH 1/5] PM / shmobile: Don't include SH7372's INTCS in syscore suspend/resume
Date: Fri, 16 Dec 2011 01:11:13 +0100 [thread overview]
Message-ID: <201112160111.14170.rjw@sisk.pl> (raw)
In-Reply-To: <201112160110.09124.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
Since the SH7372's INTCS in included into syscore suspend/resume,
which causes the chip to be accessed when PM domains have been
turned off during system suspend, the A4R domain containing the
INTCS has to stay on during system sleep, which is suboptimal
from the power consumption point of view.
For this reason, add a new INTC flag, skip_syscore_suspend, to mark
the INTCS for intc_suspend() and intc_resume(), so that they don't
touch it. This allows the A4R domain to be turned off during
system suspend and the INTCS state is resrored during system
resume by the A4R's "power on" code.
Suggested-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Magnus Damm <damm@opensource.se>
---
arch/arm/mach-shmobile/intc-sh7372.c | 1 +
drivers/sh/intc/core.c | 8 ++++++++
drivers/sh/intc/internals.h | 1 +
include/linux/sh_intc.h | 1 +
4 files changed, 11 insertions(+)
Index: linux/include/linux/sh_intc.h
===================================================================
--- linux.orig/include/linux/sh_intc.h
+++ linux/include/linux/sh_intc.h
@@ -95,6 +95,7 @@ struct intc_desc {
unsigned int num_resources;
intc_enum force_enable;
intc_enum force_disable;
+ bool skip_syscore_suspend;
struct intc_hw_desc hw;
};
Index: linux/arch/arm/mach-shmobile/intc-sh7372.c
===================================================================
--- linux.orig/arch/arm/mach-shmobile/intc-sh7372.c
+++ linux/arch/arm/mach-shmobile/intc-sh7372.c
@@ -535,6 +535,7 @@ static struct resource intcs_resources[]
static struct intc_desc intcs_desc __initdata = {
.name = "sh7372-intcs",
.force_enable = ENABLED_INTCS,
+ .skip_syscore_suspend = true,
.resource = intcs_resources,
.num_resources = ARRAY_SIZE(intcs_resources),
.hw = INTC_HW_DESC(intcs_vectors, intcs_groups, intcs_mask_registers,
Index: linux/drivers/sh/intc/core.c
===================================================================
--- linux.orig/drivers/sh/intc/core.c
+++ linux/drivers/sh/intc/core.c
@@ -354,6 +354,8 @@ int __init register_intc_controller(stru
if (desc->force_enable)
intc_enable_disable_enum(desc, d, desc->force_enable, 1);
+ d->skip_suspend = desc->skip_syscore_suspend;
+
nr_intc_controllers++;
return 0;
@@ -386,6 +388,9 @@ static int intc_suspend(void)
list_for_each_entry(d, &intc_list, list) {
int irq;
+ if (d->skip_suspend)
+ continue;
+
/* enable wakeup irqs belonging to this intc controller */
for_each_active_irq(irq) {
struct irq_data *data;
@@ -409,6 +414,9 @@ static void intc_resume(void)
list_for_each_entry(d, &intc_list, list) {
int irq;
+ if (d->skip_suspend)
+ continue;
+
for_each_active_irq(irq) {
struct irq_data *data;
struct irq_chip *chip;
Index: linux/drivers/sh/intc/internals.h
===================================================================
--- linux.orig/drivers/sh/intc/internals.h
+++ linux/drivers/sh/intc/internals.h
@@ -67,6 +67,7 @@ struct intc_desc_int {
struct intc_window *window;
unsigned int nr_windows;
struct irq_chip chip;
+ bool skip_suspend;
};
next prev parent reply other threads:[~2011-12-16 0:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-09 23:42 [RFC][PATCH 0/4] PM / shmobile: Use PM QoS latency constraints in touchscreen driver Rafael J. Wysocki
2011-12-09 23:43 ` [RFC][PATCH 1/4] PM / shmobile: Don't include SH7372's INTCS in syscore suspend/resume Rafael J. Wysocki
2011-12-09 23:44 ` [RFC][PATCH 2/4] PM / shmobile: Remove the stay_on flag from SH7372's PM domains Rafael J. Wysocki
2011-12-09 23:45 ` [RFC][PATCH 3/4] PM / QoS: Introduce dev_pm_qos_add_ancestor_request() Rafael J. Wysocki
2011-12-09 23:46 ` [RFC][PATCH 4/4] PM / input / touchscreen: Make st1232 use device PM QoS constraints Rafael J. Wysocki
2011-12-12 14:34 ` Guennadi Liakhovetski
2011-12-16 0:10 ` [Update][PATCH 0/5] PM / shmobile: Use PM QoS latency constraints in touchscreen driver on SH7372 Rafael J. Wysocki
2011-12-16 0:11 ` Rafael J. Wysocki [this message]
2011-12-16 0:12 ` [Update][PATCH 2/5] PM / shmobile: Remove the stay_on flag from SH7372's PM domains Rafael J. Wysocki
2011-12-16 0:12 ` [Update][PATCH 3/5] PM / QoS: Introduce dev_pm_qos_add_ancestor_request() Rafael J. Wysocki
2011-12-16 0:13 ` [Update][PATCH 4/5] PM / input / touchscreen: Make st1232 use device PM QoS constraints Rafael J. Wysocki
2011-12-16 0:16 ` [Update][PATCH 5/5] PM / shmobile: Allow the A4R domain to be turned off at run time Rafael J. Wysocki
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=201112160111.14170.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=g.liakhovetski@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
/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
Powered by JetHome