diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-12-22 12:57:02 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-12-22 12:57:02 -0500 |
commit | 4b7bd364700d9ac8372eff48832062b936d0793b (patch) | |
tree | 0dbf78c95456a0b02d07fcd473281f04a87e266d /arch/arm/mach-omap2/pm34xx.c | |
parent | c0d8768af260e2cbb4bf659ae6094a262c86b085 (diff) | |
parent | 90a8a73c06cc32b609a880d48449d7083327e11a (diff) |
Merge branch 'master' into for-next
Conflicts:
MAINTAINERS
arch/arm/mach-omap2/pm24xx.c
drivers/scsi/bfa/bfa_fcpim.c
Needed to update to apply fixes for which the old branch was too
outdated.
Diffstat (limited to 'arch/arm/mach-omap2/pm34xx.c')
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 4000c3c8bbd5..0cb20d29f70c 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/console.h> | ||
31 | 32 | ||
32 | #include <plat/sram.h> | 33 | #include <plat/sram.h> |
33 | #include <plat/clockdomain.h> | 34 | #include <plat/clockdomain.h> |
@@ -49,6 +50,19 @@ | |||
49 | #include "sdrc.h" | 50 | #include "sdrc.h" |
50 | #include "control.h" | 51 | #include "control.h" |
51 | 52 | ||
53 | #ifdef CONFIG_SUSPEND | ||
54 | static suspend_state_t suspend_state = PM_SUSPEND_ON; | ||
55 | static inline bool is_suspending(void) | ||
56 | { | ||
57 | return (suspend_state != PM_SUSPEND_ON); | ||
58 | } | ||
59 | #else | ||
60 | static inline bool is_suspending(void) | ||
61 | { | ||
62 | return false; | ||
63 | } | ||
64 | #endif | ||
65 | |||
52 | /* Scratchpad offsets */ | 66 | /* Scratchpad offsets */ |
53 | #define OMAP343X_TABLE_ADDRESS_OFFSET 0xc4 | 67 | #define OMAP343X_TABLE_ADDRESS_OFFSET 0xc4 |
54 | #define OMAP343X_TABLE_VALUE_OFFSET 0xc0 | 68 | #define OMAP343X_TABLE_VALUE_OFFSET 0xc0 |
@@ -385,6 +399,13 @@ void omap_sram_idle(void) | |||
385 | omap3_enable_io_chain(); | 399 | omap3_enable_io_chain(); |
386 | } | 400 | } |
387 | 401 | ||
402 | /* Block console output in case it is on one of the OMAP UARTs */ | ||
403 | if (!is_suspending()) | ||
404 | if (per_next_state < PWRDM_POWER_ON || | ||
405 | core_next_state < PWRDM_POWER_ON) | ||
406 | if (try_acquire_console_sem()) | ||
407 | goto console_still_active; | ||
408 | |||
388 | /* PER */ | 409 | /* PER */ |
389 | if (per_next_state < PWRDM_POWER_ON) { | 410 | if (per_next_state < PWRDM_POWER_ON) { |
390 | omap_uart_prepare_idle(2); | 411 | omap_uart_prepare_idle(2); |
@@ -463,6 +484,10 @@ void omap_sram_idle(void) | |||
463 | omap_uart_resume_idle(3); | 484 | omap_uart_resume_idle(3); |
464 | } | 485 | } |
465 | 486 | ||
487 | if (!is_suspending()) | ||
488 | release_console_sem(); | ||
489 | |||
490 | console_still_active: | ||
466 | /* Disable IO-PAD and IO-CHAIN wakeup */ | 491 | /* Disable IO-PAD and IO-CHAIN wakeup */ |
467 | if (omap3_has_io_wakeup() && | 492 | if (omap3_has_io_wakeup() && |
468 | (per_next_state < PWRDM_POWER_ON || | 493 | (per_next_state < PWRDM_POWER_ON || |
@@ -504,8 +529,6 @@ out: | |||
504 | } | 529 | } |
505 | 530 | ||
506 | #ifdef CONFIG_SUSPEND | 531 | #ifdef CONFIG_SUSPEND |
507 | static suspend_state_t suspend_state; | ||
508 | |||
509 | static int omap3_pm_prepare(void) | 532 | static int omap3_pm_prepare(void) |
510 | { | 533 | { |
511 | disable_hlt(); | 534 | disable_hlt(); |