|
@@ -28,7 +28,6 @@
|
|
|
#include <linux/clk.h>
|
|
|
#include <linux/delay.h>
|
|
|
#include <linux/slab.h>
|
|
|
-#include <linux/console.h>
|
|
|
#include <trace/events/power.h>
|
|
|
|
|
|
#include <asm/suspend.h>
|
|
@@ -54,15 +53,6 @@
|
|
|
|
|
|
#ifdef CONFIG_SUSPEND
|
|
|
static suspend_state_t suspend_state = PM_SUSPEND_ON;
|
|
|
-static inline bool is_suspending(void)
|
|
|
-{
|
|
|
- return (suspend_state != PM_SUSPEND_ON) && console_suspend_enabled;
|
|
|
-}
|
|
|
-#else
|
|
|
-static inline bool is_suspending(void)
|
|
|
-{
|
|
|
- return false;
|
|
|
-}
|
|
|
#endif
|
|
|
|
|
|
/* pm34xx errata defined in pm.h */
|
|
@@ -376,20 +366,11 @@ void omap_sram_idle(void)
|
|
|
omap3_enable_io_chain();
|
|
|
}
|
|
|
|
|
|
- /* Block console output in case it is on one of the OMAP UARTs */
|
|
|
- if (!is_suspending())
|
|
|
- if (per_next_state < PWRDM_POWER_ON ||
|
|
|
- core_next_state < PWRDM_POWER_ON)
|
|
|
- if (!console_trylock())
|
|
|
- goto console_still_active;
|
|
|
-
|
|
|
pwrdm_pre_transition();
|
|
|
|
|
|
/* PER */
|
|
|
if (per_next_state < PWRDM_POWER_ON) {
|
|
|
per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0;
|
|
|
- omap_uart_prepare_idle(2);
|
|
|
- omap_uart_prepare_idle(3);
|
|
|
omap2_gpio_prepare_for_idle(per_going_off);
|
|
|
if (per_next_state == PWRDM_POWER_OFF)
|
|
|
omap3_per_save_context();
|
|
@@ -397,8 +378,6 @@ void omap_sram_idle(void)
|
|
|
|
|
|
/* CORE */
|
|
|
if (core_next_state < PWRDM_POWER_ON) {
|
|
|
- omap_uart_prepare_idle(0);
|
|
|
- omap_uart_prepare_idle(1);
|
|
|
if (core_next_state == PWRDM_POWER_OFF) {
|
|
|
omap3_core_save_context();
|
|
|
omap3_cm_save_context();
|
|
@@ -447,8 +426,6 @@ void omap_sram_idle(void)
|
|
|
omap3_sram_restore_context();
|
|
|
omap2_sms_restore_context();
|
|
|
}
|
|
|
- omap_uart_resume_idle(0);
|
|
|
- omap_uart_resume_idle(1);
|
|
|
if (core_next_state == PWRDM_POWER_OFF)
|
|
|
omap2_prm_clear_mod_reg_bits(OMAP3430_AUTO_OFF_MASK,
|
|
|
OMAP3430_GR_MOD,
|
|
@@ -464,14 +441,8 @@ void omap_sram_idle(void)
|
|
|
omap2_gpio_resume_after_idle();
|
|
|
if (per_prev_state == PWRDM_POWER_OFF)
|
|
|
omap3_per_restore_context();
|
|
|
- omap_uart_resume_idle(2);
|
|
|
- omap_uart_resume_idle(3);
|
|
|
}
|
|
|
|
|
|
- if (!is_suspending())
|
|
|
- console_unlock();
|
|
|
-
|
|
|
-console_still_active:
|
|
|
/* Disable IO-PAD and IO-CHAIN wakeup */
|
|
|
if (omap3_has_io_wakeup() &&
|
|
|
(per_next_state < PWRDM_POWER_ON ||
|
|
@@ -533,7 +504,6 @@ static int omap3_pm_suspend(void)
|
|
|
goto restore;
|
|
|
}
|
|
|
|
|
|
- omap_uart_prepare_suspend();
|
|
|
omap3_intc_suspend();
|
|
|
|
|
|
omap_sram_idle();
|
|
@@ -580,14 +550,12 @@ static int omap3_pm_begin(suspend_state_t state)
|
|
|
{
|
|
|
disable_hlt();
|
|
|
suspend_state = state;
|
|
|
- omap_uart_enable_irqs(0);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
static void omap3_pm_end(void)
|
|
|
{
|
|
|
suspend_state = PM_SUSPEND_ON;
|
|
|
- omap_uart_enable_irqs(1);
|
|
|
enable_hlt();
|
|
|
return;
|
|
|
}
|