diff options
author | Jonas Aaberg <jonas.aberg@stericsson.com> | 2011-09-20 12:08:44 +0200 |
---|---|---|
committer | Jonas ABERG <jonas.aberg@stericsson.com> | 2011-09-29 08:52:27 +0200 |
commit | a1104607565cae4602bc13d26e71d90bde5bf4c6 (patch) | |
tree | d97a8dd4f5739eb57ce999e8b4aa6191b4597cb8 /arch/arm/mach-ux500/pm | |
parent | 19f72d6aa338cea6a207e77b52082fa7508c5f76 (diff) |
ARM: ux500: suspend_dbg: Show status upon wake
Change-Id: I3e0ce42579ae1830e024f53230692947f45763d5
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32080
Diffstat (limited to 'arch/arm/mach-ux500/pm')
-rw-r--r-- | arch/arm/mach-ux500/pm/suspend.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/pm/suspend_dbg.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-ux500/pm/suspend_dbg.h | 6 |
3 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/pm/suspend.c b/arch/arm/mach-ux500/pm/suspend.c index dc0ee2eef05..f1b23529877 100644 --- a/arch/arm/mach-ux500/pm/suspend.c +++ b/arch/arm/mach-ux500/pm/suspend.c @@ -104,6 +104,8 @@ static int suspend(bool do_deepsleep) /* If GPIO woke us up then save the pins that caused the wake up */ ux500_pm_gpio_save_wake_up_status(); + ux500_suspend_dbg_sleep_status(do_deepsleep); + /* APE was turned off, restore IO ring */ ux500_pm_prcmu_set_ioforce(false); diff --git a/arch/arm/mach-ux500/pm/suspend_dbg.c b/arch/arm/mach-ux500/pm/suspend_dbg.c index 601b1282230..301383a5ab9 100644 --- a/arch/arm/mach-ux500/pm/suspend_dbg.c +++ b/arch/arm/mach-ux500/pm/suspend_dbg.c @@ -12,6 +12,8 @@ #include <linux/interrupt.h> #include <linux/gpio.h> +#include <mach/pm.h> + #ifdef CONFIG_UX500_SUSPEND_DBG_WAKE_ON_UART void ux500_suspend_dbg_add_wake_on_uart(void) { @@ -25,3 +27,20 @@ void ux500_suspend_dbg_remove_wake_on_uart(void) irq_set_irq_wake(GPIO_TO_IRQ(CONFIG_UX500_CONSOLE_UART_GPIO_PIN), 0); } #endif + +void ux500_suspend_dbg_sleep_status(bool is_deepsleep) +{ + enum prcmu_idle_stat prcmu_status; + + prcmu_status = ux500_pm_prcmu_idle_stat(); + + if (is_deepsleep) { + pr_info("Returning from ApDeepSleep. PRCMU ret: 0x%x - %s\n", + prcmu_status, + prcmu_status == DEEP_SLEEP_OK ? "Success" : "Fail!"); + } else { + pr_info("Returning from ApSleep. PRCMU ret: 0x%x - %s\n", + prcmu_status, + prcmu_status == SLEEP_OK ? "Success" : "Fail!"); + } +} diff --git a/arch/arm/mach-ux500/pm/suspend_dbg.h b/arch/arm/mach-ux500/pm/suspend_dbg.h index 36132391774..dd0b27ff963 100644 --- a/arch/arm/mach-ux500/pm/suspend_dbg.h +++ b/arch/arm/mach-ux500/pm/suspend_dbg.h @@ -18,4 +18,10 @@ static inline void ux500_suspend_dbg_add_wake_on_uart(void) { } static inline void ux500_suspend_dbg_remove_wake_on_uart(void) { } #endif +#ifdef CONFIG_UX500_SUSPEND_DBG +void ux500_suspend_dbg_sleep_status(bool is_deepsleep); +#else +static inline void ux500_suspend_dbg_sleep_status(bool is_deepsleep) { } +#endif + #endif |