aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-09-03 06:06:34 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-09-26 18:43:20 -0400
commit5a3d96519040f9736b9f8089e2a1e33a81a6eafe (patch)
treebe92df6b14ba6c9e420bc45d13a76b812991bb0c
parent4fa7c24e94b3f5bfb367bb847af3c3abd8cca3c0 (diff)
[ARM] pxa: better MFP low power state support for pxa25x/pxa27x
When configured as a specific low power state: MFP_LPM_DRIVE_LOW, MFP_LPM_DRIVE_HIGH, the corresponding GPDR register bit during low power mode shall be re-configured as output (if they are not configured so), thus the PGSRx bits can output. Create an additional low power values GPDR registers, and properly save/restore the GAFR + GPDR registers when doing suspend/resume. Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/mach-pxa/generic.h1
-rw-r--r--arch/arm/mach-pxa/include/mach/mfp.h5
-rw-r--r--arch/arm/mach-pxa/mfp-pxa2xx.c222
-rw-r--r--arch/arm/mach-pxa/pxa25x.c28
-rw-r--r--arch/arm/mach-pxa/pxa27x.c37
5 files changed, 162 insertions, 131 deletions
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
index 041c048320e4..dc876a8e6668 100644
--- a/arch/arm/mach-pxa/generic.h
+++ b/arch/arm/mach-pxa/generic.h
@@ -65,4 +65,5 @@ static inline void pxa3xx_clear_reset_status(unsigned int mask) {}
65 65
66extern struct sysdev_class pxa_irq_sysclass; 66extern struct sysdev_class pxa_irq_sysclass;
67extern struct sysdev_class pxa_gpio_sysclass; 67extern struct sysdev_class pxa_gpio_sysclass;
68extern struct sysdev_class pxa2xx_mfp_sysclass;
68extern struct sysdev_class pxa3xx_mfp_sysclass; 69extern struct sysdev_class pxa3xx_mfp_sysclass;
diff --git a/arch/arm/mach-pxa/include/mach/mfp.h b/arch/arm/mach-pxa/include/mach/mfp.h
index 8769567b389b..482185053a92 100644
--- a/arch/arm/mach-pxa/include/mach/mfp.h
+++ b/arch/arm/mach-pxa/include/mach/mfp.h
@@ -274,12 +274,13 @@ typedef unsigned long mfp_cfg_t;
274#define MFP_DS_MASK (0x7 << 13) 274#define MFP_DS_MASK (0x7 << 13)
275#define MFP_DS(x) (((x) >> 13) & 0x7) 275#define MFP_DS(x) (((x) >> 13) & 0x7)
276 276
277#define MFP_LPM_INPUT (0x0 << 16) 277#define MFP_LPM_DEFAULT (0x0 << 16)
278#define MFP_LPM_DRIVE_LOW (0x1 << 16) 278#define MFP_LPM_DRIVE_LOW (0x1 << 16)
279#define MFP_LPM_DRIVE_HIGH (0x2 << 16) 279#define MFP_LPM_DRIVE_HIGH (0x2 << 16)
280#define MFP_LPM_PULL_LOW (0x3 << 16) 280#define MFP_LPM_PULL_LOW (0x3 << 16)
281#define MFP_LPM_PULL_HIGH (0x4 << 16) 281#define MFP_LPM_PULL_HIGH (0x4 << 16)
282#define MFP_LPM_FLOAT (0x5 << 16) 282#define MFP_LPM_FLOAT (0x5 << 16)
283#define MFP_LPM_INPUT (0x6 << 16)
283#define MFP_LPM_STATE_MASK (0x7 << 16) 284#define MFP_LPM_STATE_MASK (0x7 << 16)
284#define MFP_LPM_STATE(x) (((x) >> 16) & 0x7) 285#define MFP_LPM_STATE(x) (((x) >> 16) & 0x7)
285 286
@@ -297,7 +298,7 @@ typedef unsigned long mfp_cfg_t;
297#define MFP_PULL_MASK (0x3 << 21) 298#define MFP_PULL_MASK (0x3 << 21)
298#define MFP_PULL(x) (((x) >> 21) & 0x3) 299#define MFP_PULL(x) (((x) >> 21) & 0x3)
299 300
300#define MFP_CFG_DEFAULT (MFP_AF0 | MFP_DS03X | MFP_LPM_INPUT |\ 301#define MFP_CFG_DEFAULT (MFP_AF0 | MFP_DS03X | MFP_LPM_DEFAULT |\
301 MFP_LPM_EDGE_NONE | MFP_PULL_NONE) 302 MFP_LPM_EDGE_NONE | MFP_PULL_NONE)
302 303
303#define MFP_CFG(pin, af) \ 304#define MFP_CFG(pin, af) \
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c
index 925575f10acf..3ee1f39062e9 100644
--- a/arch/arm/mach-pxa/mfp-pxa2xx.c
+++ b/arch/arm/mach-pxa/mfp-pxa2xx.c
@@ -25,7 +25,12 @@
25 25
26#include "generic.h" 26#include "generic.h"
27 27
28#define PGSR(x) __REG2(0x40F00020, ((x) & 0x60) >> 3) 28#define gpio_to_bank(gpio) ((gpio) >> 5)
29
30#define PGSR(x) __REG2(0x40F00020, (x) << 2)
31#define __GAFR(u, x) __REG2((u) ? 0x40E00058 : 0x40E00054, (x) << 3)
32#define GAFR_L(x) __GAFR(0, x)
33#define GAFR_U(x) __GAFR(1, x)
29 34
30#define PWER_WE35 (1 << 24) 35#define PWER_WE35 (1 << 24)
31 36
@@ -38,49 +43,59 @@ struct gpio_desc {
38}; 43};
39 44
40static struct gpio_desc gpio_desc[MFP_PIN_GPIO127 + 1]; 45static struct gpio_desc gpio_desc[MFP_PIN_GPIO127 + 1];
46static int gpio_nr;
41 47
42static int __mfp_config_lpm(unsigned gpio, unsigned long lpm) 48static unsigned long gpdr_lpm[4];
43{
44 unsigned mask = GPIO_bit(gpio);
45
46 /* low power state */
47 switch (lpm) {
48 case MFP_LPM_DRIVE_HIGH:
49 PGSR(gpio) |= mask;
50 break;
51 case MFP_LPM_DRIVE_LOW:
52 PGSR(gpio) &= ~mask;
53 break;
54 case MFP_LPM_INPUT:
55 break;
56 default:
57 pr_warning("%s: invalid low power state for GPIO%d\n",
58 __func__, gpio);
59 return -EINVAL;
60 }
61 return 0;
62}
63 49
64static int __mfp_config_gpio(unsigned gpio, unsigned long c) 50static int __mfp_config_gpio(unsigned gpio, unsigned long c)
65{ 51{
66 unsigned long gafr, mask = GPIO_bit(gpio); 52 unsigned long gafr, mask = GPIO_bit(gpio);
67 int fn; 53 int bank = gpio_to_bank(gpio);
54 int uorl = !!(gpio & 0x10); /* GAFRx_U or GAFRx_L ? */
55 int shft = (gpio & 0xf) << 1;
56 int fn = MFP_AF(c);
57 int dir = c & MFP_DIR_OUT;
68 58
69 fn = MFP_AF(c);
70 if (fn > 3) 59 if (fn > 3)
71 return -EINVAL; 60 return -EINVAL;
72 61
73 /* alternate function and direction */ 62 /* alternate function and direction at run-time */
74 gafr = GAFR(gpio) & ~(0x3 << ((gpio & 0xf) * 2)); 63 gafr = (uorl == 0) ? GAFR_L(bank) : GAFR_U(bank);
75 GAFR(gpio) = gafr | (fn << ((gpio & 0xf) * 2)); 64 gafr = (gafr & ~(0x3 << shft)) | (fn << shft);
76 65
77 if (c & MFP_DIR_OUT) 66 if (uorl == 0)
67 GAFR_L(bank) = gafr;
68 else
69 GAFR_U(bank) = gafr;
70
71 if (dir == MFP_DIR_OUT)
78 GPDR(gpio) |= mask; 72 GPDR(gpio) |= mask;
79 else 73 else
80 GPDR(gpio) &= ~mask; 74 GPDR(gpio) &= ~mask;
81 75
82 if (__mfp_config_lpm(gpio, c & MFP_LPM_STATE_MASK)) 76 /* alternate function and direction at low power mode */
83 return -EINVAL; 77 switch (c & MFP_LPM_STATE_MASK) {
78 case MFP_LPM_DRIVE_HIGH:
79 PGSR(bank) |= mask;
80 dir = MFP_DIR_OUT;
81 break;
82 case MFP_LPM_DRIVE_LOW:
83 PGSR(bank) &= ~mask;
84 dir = MFP_DIR_OUT;
85 break;
86 case MFP_LPM_DEFAULT:
87 break;
88 default:
89 /* warning and fall through, treat as MFP_LPM_DEFAULT */
90 pr_warning("%s: GPIO%d: unsupported low power mode\n",
91 __func__, gpio);
92 break;
93 }
94
95 if (dir == MFP_DIR_OUT)
96 gpdr_lpm[bank] |= mask;
97 else
98 gpdr_lpm[bank] &= ~mask;
84 99
85 /* give early warning if MFP_LPM_CAN_WAKEUP is set on the 100 /* give early warning if MFP_LPM_CAN_WAKEUP is set on the
86 * configurations of those pins not able to wakeup 101 * configurations of those pins not able to wakeup
@@ -91,7 +106,7 @@ static int __mfp_config_gpio(unsigned gpio, unsigned long c)
91 return -EINVAL; 106 return -EINVAL;
92 } 107 }
93 108
94 if ((c & MFP_LPM_CAN_WAKEUP) && (c & MFP_DIR_OUT)) { 109 if ((c & MFP_LPM_CAN_WAKEUP) && (dir == MFP_DIR_OUT)) {
95 pr_warning("%s: output GPIO%d unable to wakeup\n", 110 pr_warning("%s: output GPIO%d unable to wakeup\n",
96 __func__, gpio); 111 __func__, gpio);
97 return -EINVAL; 112 return -EINVAL;
@@ -135,7 +150,7 @@ void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num)
135 150
136void pxa2xx_mfp_set_lpm(int mfp, unsigned long lpm) 151void pxa2xx_mfp_set_lpm(int mfp, unsigned long lpm)
137{ 152{
138 unsigned long flags; 153 unsigned long flags, c;
139 int gpio; 154 int gpio;
140 155
141 gpio = __mfp_validate(mfp); 156 gpio = __mfp_validate(mfp);
@@ -143,7 +158,11 @@ void pxa2xx_mfp_set_lpm(int mfp, unsigned long lpm)
143 return; 158 return;
144 159
145 local_irq_save(flags); 160 local_irq_save(flags);
146 __mfp_config_lpm(gpio, lpm); 161
162 c = gpio_desc[gpio].config;
163 c = (c & ~MFP_LPM_STATE_MASK) | lpm;
164 __mfp_config_gpio(gpio, c);
165
147 local_irq_restore(flags); 166 local_irq_restore(flags);
148} 167}
149 168
@@ -187,23 +206,22 @@ int gpio_set_wake(unsigned int gpio, unsigned int on)
187} 206}
188 207
189#ifdef CONFIG_PXA25x 208#ifdef CONFIG_PXA25x
190static int __init pxa25x_mfp_init(void) 209static void __init pxa25x_mfp_init(void)
191{ 210{
192 int i; 211 int i;
193 212
194 if (cpu_is_pxa25x()) { 213 for (i = 0; i <= 84; i++)
195 for (i = 0; i <= 84; i++) 214 gpio_desc[i].valid = 1;
196 gpio_desc[i].valid = 1;
197 215
198 for (i = 0; i <= 15; i++) { 216 for (i = 0; i <= 15; i++) {
199 gpio_desc[i].can_wakeup = 1; 217 gpio_desc[i].can_wakeup = 1;
200 gpio_desc[i].mask = GPIO_bit(i); 218 gpio_desc[i].mask = GPIO_bit(i);
201 }
202 } 219 }
203 220
204 return 0; 221 gpio_nr = 85;
205} 222}
206postcore_initcall(pxa25x_mfp_init); 223#else
224static inline void pxa25x_mfp_init(void) {}
207#endif /* CONFIG_PXA25x */ 225#endif /* CONFIG_PXA25x */
208 226
209#ifdef CONFIG_PXA27x 227#ifdef CONFIG_PXA27x
@@ -233,45 +251,103 @@ int keypad_set_wake(unsigned int on)
233 return 0; 251 return 0;
234} 252}
235 253
236static int __init pxa27x_mfp_init(void) 254static void __init pxa27x_mfp_init(void)
237{ 255{
238 int i, gpio; 256 int i, gpio;
239 257
240 if (cpu_is_pxa27x()) { 258 for (i = 0; i <= 120; i++) {
241 for (i = 0; i <= 120; i++) { 259 /* skip GPIO2, 5, 6, 7, 8, they are not
242 /* skip GPIO2, 5, 6, 7, 8, they are not 260 * valid pins allow configuration
243 * valid pins allow configuration 261 */
244 */ 262 if (i == 2 || i == 5 || i == 6 || i == 7 || i == 8)
245 if (i == 2 || i == 5 || i == 6 || 263 continue;
246 i == 7 || i == 8)
247 continue;
248 264
249 gpio_desc[i].valid = 1; 265 gpio_desc[i].valid = 1;
250 } 266 }
251 267
252 /* Keypad GPIOs */ 268 /* Keypad GPIOs */
253 for (i = 0; i < ARRAY_SIZE(pxa27x_pkwr_gpio); i++) { 269 for (i = 0; i < ARRAY_SIZE(pxa27x_pkwr_gpio); i++) {
254 gpio = pxa27x_pkwr_gpio[i]; 270 gpio = pxa27x_pkwr_gpio[i];
255 gpio_desc[gpio].can_wakeup = 1; 271 gpio_desc[gpio].can_wakeup = 1;
256 gpio_desc[gpio].keypad_gpio = 1; 272 gpio_desc[gpio].keypad_gpio = 1;
257 gpio_desc[gpio].mask = 1 << i; 273 gpio_desc[gpio].mask = 1 << i;
258 } 274 }
259 275
260 /* Overwrite GPIO13 as a PWER wakeup source */ 276 /* Overwrite GPIO13 as a PWER wakeup source */
261 for (i = 0; i <= 15; i++) { 277 for (i = 0; i <= 15; i++) {
262 /* skip GPIO2, 5, 6, 7, 8 */ 278 /* skip GPIO2, 5, 6, 7, 8 */
263 if (GPIO_bit(i) & 0x1e4) 279 if (GPIO_bit(i) & 0x1e4)
264 continue; 280 continue;
265 281
266 gpio_desc[i].can_wakeup = 1; 282 gpio_desc[i].can_wakeup = 1;
267 gpio_desc[i].mask = GPIO_bit(i); 283 gpio_desc[i].mask = GPIO_bit(i);
268 } 284 }
285
286 gpio_desc[35].can_wakeup = 1;
287 gpio_desc[35].mask = PWER_WE35;
288
289 gpio_nr = 121;
290}
291#else
292static inline void pxa27x_mfp_init(void) {}
293#endif /* CONFIG_PXA27x */
294
295#ifdef CONFIG_PM
296static unsigned long saved_gafr[2][4];
297static unsigned long saved_gpdr[4];
298
299static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state)
300{
301 int i;
302
303 for (i = 0; i <= gpio_to_bank(gpio_nr); i++) {
269 304
270 gpio_desc[35].can_wakeup = 1; 305 saved_gafr[0][i] = GAFR_L(i);
271 gpio_desc[35].mask = PWER_WE35; 306 saved_gafr[1][i] = GAFR_U(i);
307 saved_gpdr[i] = GPDR(i * 32);
308
309 GPDR(i * 32) = gpdr_lpm[i];
272 } 310 }
311 return 0;
312}
273 313
314static int pxa2xx_mfp_resume(struct sys_device *d)
315{
316 int i;
317
318 for (i = 0; i <= gpio_to_bank(gpio_nr); i++) {
319 GAFR_L(i) = saved_gafr[0][i];
320 GAFR_U(i) = saved_gafr[1][i];
321 GPDR(i * 32) = saved_gpdr[i];
322 }
323 PSSR = PSSR_RDH | PSSR_PH;
274 return 0; 324 return 0;
275} 325}
276postcore_initcall(pxa27x_mfp_init); 326#else
277#endif /* CONFIG_PXA27x */ 327#define pxa2xx_mfp_suspend NULL
328#define pxa2xx_mfp_resume NULL
329#endif
330
331struct sysdev_class pxa2xx_mfp_sysclass = {
332 .name = "mfp",
333 .suspend = pxa2xx_mfp_suspend,
334 .resume = pxa2xx_mfp_resume,
335};
336
337static int __init pxa2xx_mfp_init(void)
338{
339 int i;
340
341 if (cpu_is_pxa25x())
342 pxa25x_mfp_init();
343
344 if (cpu_is_pxa27x())
345 pxa27x_mfp_init();
346
347 /* initialize gafr_run[], pgsr_lpm[] from existing values */
348 for (i = 0; i <= gpio_to_bank(gpio_nr); i++)
349 gpdr_lpm[i] = GPDR(i * 32);
350
351 return sysdev_class_register(&pxa2xx_mfp_sysclass);
352}
353postcore_initcall(pxa2xx_mfp_init);
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index 305452b56e91..f0eda2094494 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -203,33 +203,17 @@ static struct clk pxa25x_clks[] = {
203 * More ones like CP and general purpose register values are preserved 203 * More ones like CP and general purpose register values are preserved
204 * with the stack pointer in sleep.S. 204 * with the stack pointer in sleep.S.
205 */ 205 */
206enum { SLEEP_SAVE_PGSR0, SLEEP_SAVE_PGSR1, SLEEP_SAVE_PGSR2, 206enum {
207
208 SLEEP_SAVE_GAFR0_L, SLEEP_SAVE_GAFR0_U,
209 SLEEP_SAVE_GAFR1_L, SLEEP_SAVE_GAFR1_U,
210 SLEEP_SAVE_GAFR2_L, SLEEP_SAVE_GAFR2_U,
211
212 SLEEP_SAVE_PSTR, 207 SLEEP_SAVE_PSTR,
213
214 SLEEP_SAVE_CKEN, 208 SLEEP_SAVE_CKEN,
215
216 SLEEP_SAVE_COUNT 209 SLEEP_SAVE_COUNT
217}; 210};
218 211
219 212
220static void pxa25x_cpu_pm_save(unsigned long *sleep_save) 213static void pxa25x_cpu_pm_save(unsigned long *sleep_save)
221{ 214{
222 SAVE(PGSR0); SAVE(PGSR1); SAVE(PGSR2);
223
224 SAVE(GAFR0_L); SAVE(GAFR0_U);
225 SAVE(GAFR1_L); SAVE(GAFR1_U);
226 SAVE(GAFR2_L); SAVE(GAFR2_U);
227
228 SAVE(CKEN); 215 SAVE(CKEN);
229 SAVE(PSTR); 216 SAVE(PSTR);
230
231 /* Clear GPIO transition detect bits */
232 GEDR0 = GEDR0; GEDR1 = GEDR1; GEDR2 = GEDR2;
233} 217}
234 218
235static void pxa25x_cpu_pm_restore(unsigned long *sleep_save) 219static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)
@@ -237,14 +221,6 @@ static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)
237 /* ensure not to come back here if it wasn't intended */ 221 /* ensure not to come back here if it wasn't intended */
238 PSPR = 0; 222 PSPR = 0;
239 223
240 /* restore registers */
241 RESTORE(GAFR0_L); RESTORE(GAFR0_U);
242 RESTORE(GAFR1_L); RESTORE(GAFR1_U);
243 RESTORE(GAFR2_L); RESTORE(GAFR2_U);
244 RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2);
245
246 PSSR = PSSR_RDH | PSSR_PH;
247
248 RESTORE(CKEN); 224 RESTORE(CKEN);
249 RESTORE(PSTR); 225 RESTORE(PSTR);
250} 226}
@@ -330,6 +306,8 @@ static struct sys_device pxa25x_sysdev[] = {
330 { 306 {
331 .cls = &pxa_irq_sysclass, 307 .cls = &pxa_irq_sysclass,
332 }, { 308 }, {
309 .cls = &pxa2xx_mfp_sysclass,
310 }, {
333 .cls = &pxa_gpio_sysclass, 311 .cls = &pxa_gpio_sysclass,
334 }, 312 },
335}; 313};
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index f9f6a9c31f4b..0288665ad035 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -183,36 +183,18 @@ static struct clk pxa27x_clks[] = {
183 * More ones like CP and general purpose register values are preserved 183 * More ones like CP and general purpose register values are preserved
184 * with the stack pointer in sleep.S. 184 * with the stack pointer in sleep.S.
185 */ 185 */
186enum { SLEEP_SAVE_PGSR0, SLEEP_SAVE_PGSR1, SLEEP_SAVE_PGSR2, SLEEP_SAVE_PGSR3, 186enum {
187
188 SLEEP_SAVE_GAFR0_L, SLEEP_SAVE_GAFR0_U,
189 SLEEP_SAVE_GAFR1_L, SLEEP_SAVE_GAFR1_U,
190 SLEEP_SAVE_GAFR2_L, SLEEP_SAVE_GAFR2_U,
191 SLEEP_SAVE_GAFR3_L, SLEEP_SAVE_GAFR3_U,
192
193 SLEEP_SAVE_PSTR, 187 SLEEP_SAVE_PSTR,
194
195 SLEEP_SAVE_CKEN, 188 SLEEP_SAVE_CKEN,
196
197 SLEEP_SAVE_MDREFR, 189 SLEEP_SAVE_MDREFR,
198 SLEEP_SAVE_PWER, SLEEP_SAVE_PCFR, SLEEP_SAVE_PRER, 190 SLEEP_SAVE_PCFR,
199 SLEEP_SAVE_PFER, SLEEP_SAVE_PKWR,
200
201 SLEEP_SAVE_COUNT 191 SLEEP_SAVE_COUNT
202}; 192};
203 193
204void pxa27x_cpu_pm_save(unsigned long *sleep_save) 194void pxa27x_cpu_pm_save(unsigned long *sleep_save)
205{ 195{
206 SAVE(PGSR0); SAVE(PGSR1); SAVE(PGSR2); SAVE(PGSR3);
207
208 SAVE(GAFR0_L); SAVE(GAFR0_U);
209 SAVE(GAFR1_L); SAVE(GAFR1_U);
210 SAVE(GAFR2_L); SAVE(GAFR2_U);
211 SAVE(GAFR3_L); SAVE(GAFR3_U);
212
213 SAVE(MDREFR); 196 SAVE(MDREFR);
214 SAVE(PWER); SAVE(PCFR); SAVE(PRER); 197 SAVE(PCFR);
215 SAVE(PFER); SAVE(PKWR);
216 198
217 SAVE(CKEN); 199 SAVE(CKEN);
218 SAVE(PSTR); 200 SAVE(PSTR);
@@ -223,21 +205,12 @@ void pxa27x_cpu_pm_restore(unsigned long *sleep_save)
223 /* ensure not to come back here if it wasn't intended */ 205 /* ensure not to come back here if it wasn't intended */
224 PSPR = 0; 206 PSPR = 0;
225 207
226 /* restore registers */
227 RESTORE(GAFR0_L); RESTORE(GAFR0_U);
228 RESTORE(GAFR1_L); RESTORE(GAFR1_U);
229 RESTORE(GAFR2_L); RESTORE(GAFR2_U);
230 RESTORE(GAFR3_L); RESTORE(GAFR3_U);
231 RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); RESTORE(PGSR3);
232
233 RESTORE(MDREFR); 208 RESTORE(MDREFR);
234 RESTORE(PWER); RESTORE(PCFR); RESTORE(PRER); 209 RESTORE(PCFR);
235 RESTORE(PFER); RESTORE(PKWR);
236 210
237 PSSR = PSSR_RDH | PSSR_PH; 211 PSSR = PSSR_RDH | PSSR_PH;
238 212
239 RESTORE(CKEN); 213 RESTORE(CKEN);
240
241 RESTORE(PSTR); 214 RESTORE(PSTR);
242} 215}
243 216
@@ -376,6 +349,8 @@ static struct sys_device pxa27x_sysdev[] = {
376 { 349 {
377 .cls = &pxa_irq_sysclass, 350 .cls = &pxa_irq_sysclass,
378 }, { 351 }, {
352 .cls = &pxa2xx_mfp_sysclass,
353 }, {
379 .cls = &pxa_gpio_sysclass, 354 .cls = &pxa_gpio_sysclass,
380 }, 355 },
381}; 356};