diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-14 13:00:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-14 13:00:42 -0400 |
commit | 3e862dd5c94cc53ba6494804c7388303e3d25403 (patch) | |
tree | 16cec9fb546f7eb9233a6f7dd7c8be4a300503e3 /drivers | |
parent | 2344b5b6851466511663154e517f8b31f70c4bb6 (diff) | |
parent | e588a00fe546695e93077b3f7b7009f0c31d9370 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
sh: Add in PCI bus for DMA API debugging.
sh: Pre-allocate a reasonable number of DMA debug entries.
sh: sh7786: modify usb setup timeout judgment bug.
MAINTAINERS: Update sh architecture file patterns.
sh: ap325: use edge control for ov772x camera
sh: Plug in support for ARCH=sh64 using sh SRCARCH.
sh: urquell: Fix up address mapping in board comments.
sh: Add support for DMA API debugging.
sh: Provide cpumask_of_pcibus() to fix NUMA build.
sh: urquell: Add board comment
sh: wire up sys_preadv/sys_pwritev() syscalls.
sh: sh7785lcr: fix PCI address map for 32-bit mode
sh: intc: Added resume from hibernation support to the intc
Diffstat (limited to 'drivers')
-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 */ |