diff options
Diffstat (limited to 'arch/arm/mach-pxa/pxa27x.c')
-rw-r--r-- | arch/arm/mach-pxa/pxa27x.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 7e863afefb53..893964fb9659 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -120,6 +120,42 @@ EXPORT_SYMBOL(get_clk_frequency_khz); | |||
120 | EXPORT_SYMBOL(get_memclk_frequency_10khz); | 120 | EXPORT_SYMBOL(get_memclk_frequency_10khz); |
121 | EXPORT_SYMBOL(get_lcdclk_frequency_10khz); | 121 | EXPORT_SYMBOL(get_lcdclk_frequency_10khz); |
122 | 122 | ||
123 | #ifdef CONFIG_PM | ||
124 | |||
125 | int pxa_cpu_pm_prepare(suspend_state_t state) | ||
126 | { | ||
127 | switch (state) { | ||
128 | case PM_SUSPEND_MEM: | ||
129 | return 0; | ||
130 | default: | ||
131 | return -EINVAL; | ||
132 | } | ||
133 | } | ||
134 | |||
135 | void pxa_cpu_pm_enter(suspend_state_t state) | ||
136 | { | ||
137 | extern void pxa_cpu_standby(void); | ||
138 | extern void pxa_cpu_suspend(unsigned int); | ||
139 | extern void pxa_cpu_resume(void); | ||
140 | |||
141 | CKEN = CKEN22_MEMC | CKEN9_OSTIMER; | ||
142 | |||
143 | /* ensure voltage-change sequencer not initiated, which hangs */ | ||
144 | PCFR &= ~PCFR_FVC; | ||
145 | |||
146 | /* Clear edge-detect status register. */ | ||
147 | PEDR = 0xDF12FE1B; | ||
148 | |||
149 | switch (state) { | ||
150 | case PM_SUSPEND_MEM: | ||
151 | /* set resume return address */ | ||
152 | PSPR = virt_to_phys(pxa_cpu_resume); | ||
153 | pxa_cpu_suspend(3); | ||
154 | break; | ||
155 | } | ||
156 | } | ||
157 | |||
158 | #endif | ||
123 | 159 | ||
124 | /* | 160 | /* |
125 | * device registration specific to PXA27x. | 161 | * device registration specific to PXA27x. |