diff options
Diffstat (limited to 'arch/arm/mach-pxa/generic.c')
-rw-r--r-- | arch/arm/mach-pxa/generic.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 80721c610d4..44617938f3f 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -19,14 +19,8 @@ | |||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/delay.h> | ||
23 | #include <linux/ioport.h> | ||
24 | #include <linux/pm.h> | ||
25 | #include <linux/string.h> | ||
26 | #include <linux/sysdev.h> | ||
27 | 22 | ||
28 | #include <asm/hardware.h> | 23 | #include <asm/hardware.h> |
29 | #include <asm/irq.h> | ||
30 | #include <asm/system.h> | 24 | #include <asm/system.h> |
31 | #include <asm/pgtable.h> | 25 | #include <asm/pgtable.h> |
32 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
@@ -96,11 +90,6 @@ static struct map_desc standard_io_desc[] __initdata = { | |||
96 | .pfn = __phys_to_pfn(0x40000000), | 90 | .pfn = __phys_to_pfn(0x40000000), |
97 | .length = 0x02000000, | 91 | .length = 0x02000000, |
98 | .type = MT_DEVICE | 92 | .type = MT_DEVICE |
99 | }, { /* LCD */ | ||
100 | .virtual = 0xf4000000, | ||
101 | .pfn = __phys_to_pfn(0x44000000), | ||
102 | .length = 0x00100000, | ||
103 | .type = MT_DEVICE | ||
104 | }, { /* Mem Ctl */ | 93 | }, { /* Mem Ctl */ |
105 | .virtual = 0xf6000000, | 94 | .virtual = 0xf6000000, |
106 | .pfn = __phys_to_pfn(0x48000000), | 95 | .pfn = __phys_to_pfn(0x48000000), |
@@ -134,59 +123,3 @@ void __init pxa_map_io(void) | |||
134 | iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); | 123 | iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); |
135 | get_clk_frequency_khz(1); | 124 | get_clk_frequency_khz(1); |
136 | } | 125 | } |
137 | |||
138 | #ifdef CONFIG_PM | ||
139 | |||
140 | static unsigned long saved_gplr[4]; | ||
141 | static unsigned long saved_gpdr[4]; | ||
142 | static unsigned long saved_grer[4]; | ||
143 | static unsigned long saved_gfer[4]; | ||
144 | |||
145 | static int pxa_gpio_suspend(struct sys_device *dev, pm_message_t state) | ||
146 | { | ||
147 | int i, gpio; | ||
148 | |||
149 | for (gpio = 0, i = 0; gpio < pxa_last_gpio; gpio += 32, i++) { | ||
150 | saved_gplr[i] = GPLR(gpio); | ||
151 | saved_gpdr[i] = GPDR(gpio); | ||
152 | saved_grer[i] = GRER(gpio); | ||
153 | saved_gfer[i] = GFER(gpio); | ||
154 | |||
155 | /* Clear GPIO transition detect bits */ | ||
156 | GEDR(gpio) = GEDR(gpio); | ||
157 | } | ||
158 | return 0; | ||
159 | } | ||
160 | |||
161 | static int pxa_gpio_resume(struct sys_device *dev) | ||
162 | { | ||
163 | int i, gpio; | ||
164 | |||
165 | for (gpio = 0, i = 0; gpio < pxa_last_gpio; gpio += 32, i++) { | ||
166 | /* restore level with set/clear */ | ||
167 | GPSR(gpio) = saved_gplr[i]; | ||
168 | GPCR(gpio) = ~saved_gplr[i]; | ||
169 | |||
170 | GRER(gpio) = saved_grer[i]; | ||
171 | GFER(gpio) = saved_gfer[i]; | ||
172 | GPDR(gpio) = saved_gpdr[i]; | ||
173 | } | ||
174 | return 0; | ||
175 | } | ||
176 | #else | ||
177 | #define pxa_gpio_suspend NULL | ||
178 | #define pxa_gpio_resume NULL | ||
179 | #endif | ||
180 | |||
181 | struct sysdev_class pxa_gpio_sysclass = { | ||
182 | .name = "gpio", | ||
183 | .suspend = pxa_gpio_suspend, | ||
184 | .resume = pxa_gpio_resume, | ||
185 | }; | ||
186 | |||
187 | static int __init pxa_gpio_init(void) | ||
188 | { | ||
189 | return sysdev_class_register(&pxa_gpio_sysclass); | ||
190 | } | ||
191 | |||
192 | core_initcall(pxa_gpio_init); | ||