diff options
Diffstat (limited to 'arch/arm/mach-omap2/pm34xx.c')
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 528f725722a2..b07efb26de18 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -296,6 +296,8 @@ out: | |||
296 | } | 296 | } |
297 | 297 | ||
298 | #ifdef CONFIG_SUSPEND | 298 | #ifdef CONFIG_SUSPEND |
299 | static suspend_state_t suspend_state; | ||
300 | |||
299 | static int omap3_pm_prepare(void) | 301 | static int omap3_pm_prepare(void) |
300 | { | 302 | { |
301 | disable_hlt(); | 303 | disable_hlt(); |
@@ -342,11 +344,11 @@ restore: | |||
342 | return ret; | 344 | return ret; |
343 | } | 345 | } |
344 | 346 | ||
345 | static int omap3_pm_enter(suspend_state_t state) | 347 | static int omap3_pm_enter(suspend_state_t unused) |
346 | { | 348 | { |
347 | int ret = 0; | 349 | int ret = 0; |
348 | 350 | ||
349 | switch (state) { | 351 | switch (suspend_state) { |
350 | case PM_SUSPEND_STANDBY: | 352 | case PM_SUSPEND_STANDBY: |
351 | case PM_SUSPEND_MEM: | 353 | case PM_SUSPEND_MEM: |
352 | ret = omap3_pm_suspend(); | 354 | ret = omap3_pm_suspend(); |
@@ -363,7 +365,24 @@ static void omap3_pm_finish(void) | |||
363 | enable_hlt(); | 365 | enable_hlt(); |
364 | } | 366 | } |
365 | 367 | ||
368 | /* Hooks to enable / disable UART interrupts during suspend */ | ||
369 | static int omap3_pm_begin(suspend_state_t state) | ||
370 | { | ||
371 | suspend_state = state; | ||
372 | omap_uart_enable_irqs(0); | ||
373 | return 0; | ||
374 | } | ||
375 | |||
376 | static void omap3_pm_end(void) | ||
377 | { | ||
378 | suspend_state = PM_SUSPEND_ON; | ||
379 | omap_uart_enable_irqs(1); | ||
380 | return; | ||
381 | } | ||
382 | |||
366 | static struct platform_suspend_ops omap_pm_ops = { | 383 | static struct platform_suspend_ops omap_pm_ops = { |
384 | .begin = omap3_pm_begin, | ||
385 | .end = omap3_pm_end, | ||
367 | .prepare = omap3_pm_prepare, | 386 | .prepare = omap3_pm_prepare, |
368 | .enter = omap3_pm_enter, | 387 | .enter = omap3_pm_enter, |
369 | .finish = omap3_pm_finish, | 388 | .finish = omap3_pm_finish, |