]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
PM / shmobile: Don't include SH7372's INTCS in syscore suspend/resume
authorRafael J. Wysocki <rjw@sisk.pl>
Fri, 23 Dec 2011 00:23:30 +0000 (01:23 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Sun, 25 Dec 2011 22:39:11 +0000 (23:39 +0100)
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
drivers/sh/intc/core.c
drivers/sh/intc/internals.h
include/linux/sh_intc.h

index d087b31b5d12857a18d28254b9f6eb23461c69fc..89afcaba99a1a74e132dc1264d249e0099d21944 100644 (file)
@@ -535,6 +535,7 @@ static struct resource intcs_resources[] __initdata = {
 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 8b7a141ff35e848b5a505c0bb89e85daaa14ee05..be5a025eeca3d34706691ea38acaa85d59d6bb80 100644 (file)
@@ -354,6 +354,8 @@ int __init register_intc_controller(struct intc_desc *desc)
        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 5b934851efa86e63c8f03c8763f1706265f03e5f..b3fe1cf25a2805fa7fb2b432ee5b686ae25bac75 100644 (file)
@@ -67,6 +67,7 @@ struct intc_desc_int {
        struct intc_window *window;
        unsigned int nr_windows;
        struct irq_chip chip;
+       bool skip_suspend;
 };
 
 
index 5812fefbcedf1ac2685760c1d40fff52076cf054..b160645f5599f51547694c1c1771d3e2b03bd04e 100644 (file)
@@ -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;
 };