diff options
author | Nicolas Pitre <nico@org.rmk.(none)> | 2005-06-16 16:23:56 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-06-16 16:23:56 -0400 |
commit | 22f11c4e662ef0bdd87f09370a76c83ed738d5fd (patch) | |
tree | 3b3c2df768eacbd59240cd4be8d9922ab4a0ba7d /arch/arm/mach-pxa/mainstone.c | |
parent | 95220a2ea334b5ff2168cc9bf31c0e08b29bae21 (diff) |
[PATCH] ARM: 2715/1: restore CPLD interrupts upon resume for Lubbock and Mainstone
Patch from Nicolas Pitre
Without this some devices fail to work again after a suspend event.
Signed-off-by: Nicolas Pitre
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/mainstone.c')
-rw-r--r-- | arch/arm/mach-pxa/mainstone.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 6823ae28ae6a..9896afca751f 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
18 | #include <linux/sysdev.h> | ||
18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
19 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
20 | #include <linux/bitops.h> | 21 | #include <linux/bitops.h> |
@@ -62,7 +63,6 @@ static struct irqchip mainstone_irq_chip = { | |||
62 | .unmask = mainstone_unmask_irq, | 63 | .unmask = mainstone_unmask_irq, |
63 | }; | 64 | }; |
64 | 65 | ||
65 | |||
66 | static void mainstone_irq_handler(unsigned int irq, struct irqdesc *desc, | 66 | static void mainstone_irq_handler(unsigned int irq, struct irqdesc *desc, |
67 | struct pt_regs *regs) | 67 | struct pt_regs *regs) |
68 | { | 68 | { |
@@ -100,6 +100,35 @@ static void __init mainstone_init_irq(void) | |||
100 | set_irq_type(IRQ_GPIO(0), IRQT_FALLING); | 100 | set_irq_type(IRQ_GPIO(0), IRQT_FALLING); |
101 | } | 101 | } |
102 | 102 | ||
103 | #ifdef CONFIG_PM | ||
104 | |||
105 | static int mainstone_irq_resume(struct sys_device *dev) | ||
106 | { | ||
107 | MST_INTMSKENA = mainstone_irq_enabled; | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static struct sysdev_class mainstone_irq_sysclass = { | ||
112 | set_kset_name("cpld_irq"), | ||
113 | .resume = mainstone_irq_resume, | ||
114 | }; | ||
115 | |||
116 | static struct sys_device mainstone_irq_device = { | ||
117 | .cls = &mainstone_irq_sysclass, | ||
118 | }; | ||
119 | |||
120 | static int __init mainstone_irq_device_init(void) | ||
121 | { | ||
122 | int ret = sysdev_class_register(&mainstone_irq_sysclass); | ||
123 | if (ret == 0) | ||
124 | ret = sysdev_register(&mainstone_irq_device); | ||
125 | return ret; | ||
126 | } | ||
127 | |||
128 | device_initcall(mainstone_irq_device_init); | ||
129 | |||
130 | #endif | ||
131 | |||
103 | 132 | ||
104 | static struct resource smc91x_resources[] = { | 133 | static struct resource smc91x_resources[] = { |
105 | [0] = { | 134 | [0] = { |