pxa27x.c (e6aa0f07cb5e81a7cbeaf3be6e2101234c2f0d30) | pxa27x.c (5a3d96519040f9736b9f8089e2a1e33a81a6eafe) |
---|---|
1/* 2 * linux/arch/arm/mach-pxa/pxa27x.c 3 * 4 * Author: Nicolas Pitre 5 * Created: Nov 05, 2002 6 * Copyright: MontaVista Software Inc. 7 * 8 * Code specific to PXA27x aka Bulverde. --- 169 unchanged lines hidden (view full) --- 178#define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x 179#define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] 180 181/* 182 * List of global PXA peripheral registers to preserve. 183 * More ones like CP and general purpose register values are preserved 184 * with the stack pointer in sleep.S. 185 */ | 1/* 2 * linux/arch/arm/mach-pxa/pxa27x.c 3 * 4 * Author: Nicolas Pitre 5 * Created: Nov 05, 2002 6 * Copyright: MontaVista Software Inc. 7 * 8 * Code specific to PXA27x aka Bulverde. --- 169 unchanged lines hidden (view full) --- 178#define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x 179#define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] 180 181/* 182 * List of global PXA peripheral registers to preserve. 183 * More ones like CP and general purpose register values are preserved 184 * with the stack pointer in sleep.S. 185 */ |
186enum { SLEEP_SAVE_PGSR0, SLEEP_SAVE_PGSR1, SLEEP_SAVE_PGSR2, SLEEP_SAVE_PGSR3, 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 | 186enum { |
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, 199 SLEEP_SAVE_PFER, SLEEP_SAVE_PKWR, 200 | 190 SLEEP_SAVE_PCFR, |
201 SLEEP_SAVE_COUNT 202}; 203 204void pxa27x_cpu_pm_save(unsigned long *sleep_save) 205{ | 191 SLEEP_SAVE_COUNT 192}; 193 194void pxa27x_cpu_pm_save(unsigned long *sleep_save) 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); 215 SAVE(PFER); SAVE(PKWR); | 197 SAVE(PCFR); |
216 217 SAVE(CKEN); 218 SAVE(PSTR); 219} 220 221void pxa27x_cpu_pm_restore(unsigned long *sleep_save) 222{ 223 /* ensure not to come back here if it wasn't intended */ 224 PSPR = 0; 225 | 198 199 SAVE(CKEN); 200 SAVE(PSTR); 201} 202 203void pxa27x_cpu_pm_restore(unsigned long *sleep_save) 204{ 205 /* ensure not to come back here if it wasn't intended */ 206 PSPR = 0; 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); 235 RESTORE(PFER); RESTORE(PKWR); | 209 RESTORE(PCFR); |
236 237 PSSR = PSSR_RDH | PSSR_PH; 238 239 RESTORE(CKEN); | 210 211 PSSR = PSSR_RDH | PSSR_PH; 212 213 RESTORE(CKEN); |
240 | |
241 RESTORE(PSTR); 242} 243 244void pxa27x_cpu_pm_enter(suspend_state_t state) 245{ 246 extern void pxa_cpu_standby(void); 247 248 /* ensure voltage-change sequencer not initiated, which hangs */ --- 122 unchanged lines hidden (view full) --- 371 &pxa27x_device_pwm0, 372 &pxa27x_device_pwm1, 373}; 374 375static struct sys_device pxa27x_sysdev[] = { 376 { 377 .cls = &pxa_irq_sysclass, 378 }, { | 214 RESTORE(PSTR); 215} 216 217void pxa27x_cpu_pm_enter(suspend_state_t state) 218{ 219 extern void pxa_cpu_standby(void); 220 221 /* ensure voltage-change sequencer not initiated, which hangs */ --- 122 unchanged lines hidden (view full) --- 344 &pxa27x_device_pwm0, 345 &pxa27x_device_pwm1, 346}; 347 348static struct sys_device pxa27x_sysdev[] = { 349 { 350 .cls = &pxa_irq_sysclass, 351 }, { |
352 .cls = &pxa2xx_mfp_sysclass, 353 }, { |
|
379 .cls = &pxa_gpio_sysclass, 380 }, 381}; 382 383static int __init pxa27x_init(void) 384{ 385 int i, ret = 0; 386 --- 24 unchanged lines hidden --- | 354 .cls = &pxa_gpio_sysclass, 355 }, 356}; 357 358static int __init pxa27x_init(void) 359{ 360 int i, ret = 0; 361 --- 24 unchanged lines hidden --- |