diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-05-08 04:50:00 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-08 04:50:00 -0400 |
commit | f066a155334642b8a206eec625b1925d88c48aeb (patch) | |
tree | cb12975e60b70d1dae3b7397bab955de78a4d01e /drivers/sh/intc.c | |
parent | e7c064889606aab3569669078c69b87b2c527e72 (diff) | |
parent | 33df4db04a79660150e1948e3296eeb451ac121b (diff) |
Merge branch 'x86/urgent' into x86/xen
Conflicts:
arch/frv/include/asm/pgtable.h
arch/x86/include/asm/required-features.h
arch/x86/xen/mmu.c
Merge reason: x86/xen was on a .29 base still, move it to a fresher
branch and pick up Xen fixes as well, plus resolve
conflicts
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/sh/intc.c')
-rw-r--r-- | drivers/sh/intc.c | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/drivers/sh/intc.c b/drivers/sh/intc.c index 7fb9b5c4669a..12d13d99b6f0 100644 --- a/drivers/sh/intc.c +++ b/drivers/sh/intc.c | |||
@@ -44,6 +44,7 @@ struct intc_handle_int { | |||
44 | struct intc_desc_int { | 44 | struct intc_desc_int { |
45 | struct list_head list; | 45 | struct list_head list; |
46 | struct sys_device sysdev; | 46 | struct sys_device sysdev; |
47 | pm_message_t state; | ||
47 | unsigned long *reg; | 48 | unsigned long *reg; |
48 | #ifdef CONFIG_SMP | 49 | #ifdef CONFIG_SMP |
49 | unsigned long *smp; | 50 | unsigned long *smp; |
@@ -786,18 +787,44 @@ static int intc_suspend(struct sys_device *dev, pm_message_t state) | |||
786 | /* get intc controller associated with this sysdev */ | 787 | /* get intc controller associated with this sysdev */ |
787 | d = container_of(dev, struct intc_desc_int, sysdev); | 788 | d = container_of(dev, struct intc_desc_int, sysdev); |
788 | 789 | ||
789 | /* enable wakeup irqs belonging to this intc controller */ | 790 | switch (state.event) { |
790 | for_each_irq_desc(irq, desc) { | 791 | case PM_EVENT_ON: |
791 | if ((desc->status & IRQ_WAKEUP) && (desc->chip == &d->chip)) | 792 | if (d->state.event != PM_EVENT_FREEZE) |
792 | intc_enable(irq); | 793 | break; |
794 | for_each_irq_desc(irq, desc) { | ||
795 | if (desc->chip != &d->chip) | ||
796 | continue; | ||
797 | if (desc->status & IRQ_DISABLED) | ||
798 | intc_disable(irq); | ||
799 | else | ||
800 | intc_enable(irq); | ||
801 | } | ||
802 | break; | ||
803 | case PM_EVENT_FREEZE: | ||
804 | /* nothing has to be done */ | ||
805 | break; | ||
806 | case PM_EVENT_SUSPEND: | ||
807 | /* enable wakeup irqs belonging to this intc controller */ | ||
808 | for_each_irq_desc(irq, desc) { | ||
809 | if ((desc->status & IRQ_WAKEUP) && (desc->chip == &d->chip)) | ||
810 | intc_enable(irq); | ||
811 | } | ||
812 | break; | ||
793 | } | 813 | } |
814 | d->state = state; | ||
794 | 815 | ||
795 | return 0; | 816 | return 0; |
796 | } | 817 | } |
797 | 818 | ||
819 | static int intc_resume(struct sys_device *dev) | ||
820 | { | ||
821 | return intc_suspend(dev, PMSG_ON); | ||
822 | } | ||
823 | |||
798 | static struct sysdev_class intc_sysdev_class = { | 824 | static struct sysdev_class intc_sysdev_class = { |
799 | .name = "intc", | 825 | .name = "intc", |
800 | .suspend = intc_suspend, | 826 | .suspend = intc_suspend, |
827 | .resume = intc_resume, | ||
801 | }; | 828 | }; |
802 | 829 | ||
803 | /* register this intc as sysdev to allow suspend/resume */ | 830 | /* register this intc as sysdev to allow suspend/resume */ |