diff options
Diffstat (limited to 'arch/arm/mach-pxa/pxa27x.c')
| -rw-r--r-- | arch/arm/mach-pxa/pxa27x.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index a425ec71e657..ec68cc16b4e3 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | #include <mach/ohci.h> | 27 | #include <mach/ohci.h> |
| 28 | #include <mach/pm.h> | 28 | #include <mach/pm.h> |
| 29 | #include <mach/dma.h> | 29 | #include <mach/dma.h> |
| 30 | #include <mach/i2c.h> | 30 | #include <plat/i2c.h> |
| 31 | 31 | ||
| 32 | #include "generic.h" | 32 | #include "generic.h" |
| 33 | #include "devices.h" | 33 | #include "devices.h" |
| @@ -204,6 +204,23 @@ static struct clk_lookup pxa27x_clkregs[] = { | |||
| 204 | #define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] | 204 | #define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] |
| 205 | 205 | ||
| 206 | /* | 206 | /* |
| 207 | * allow platforms to override default PWRMODE setting used for PM_SUSPEND_MEM | ||
| 208 | */ | ||
| 209 | static unsigned int pwrmode = PWRMODE_SLEEP; | ||
| 210 | |||
| 211 | int __init pxa27x_set_pwrmode(unsigned int mode) | ||
| 212 | { | ||
| 213 | switch (mode) { | ||
| 214 | case PWRMODE_SLEEP: | ||
| 215 | case PWRMODE_DEEPSLEEP: | ||
| 216 | pwrmode = mode; | ||
| 217 | return 0; | ||
| 218 | } | ||
| 219 | |||
| 220 | return -EINVAL; | ||
| 221 | } | ||
| 222 | |||
| 223 | /* | ||
| 207 | * List of global PXA peripheral registers to preserve. | 224 | * List of global PXA peripheral registers to preserve. |
| 208 | * More ones like CP and general purpose register values are preserved | 225 | * More ones like CP and general purpose register values are preserved |
| 209 | * with the stack pointer in sleep.S. | 226 | * with the stack pointer in sleep.S. |
| @@ -254,7 +271,7 @@ void pxa27x_cpu_pm_enter(suspend_state_t state) | |||
| 254 | pxa_cpu_standby(); | 271 | pxa_cpu_standby(); |
| 255 | break; | 272 | break; |
| 256 | case PM_SUSPEND_MEM: | 273 | case PM_SUSPEND_MEM: |
| 257 | pxa27x_cpu_suspend(PWRMODE_SLEEP); | 274 | pxa27x_cpu_suspend(pwrmode); |
| 258 | break; | 275 | break; |
| 259 | } | 276 | } |
| 260 | } | 277 | } |
