aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuodong Xu <guodong.xu@linaro.org>2013-04-23 14:07:25 +0800
committerGuodong Xu <guodong.xu@linaro.org>2013-08-21 10:32:17 +0800
commitdf66280211721104ad72654e8c69095263cf50e3 (patch)
treed5f980777a8aab6f54fe5199cd56fd7e405c2b64
parented45772399ff186457b08f4a1e14d3b5c599cbfe (diff)
pm: mach-hs: workaround, reinit uart when 'no_console_suspend'tracking-hilt-suspend-resume-0821tracking-hilt-suspend-resume
If 'no_consle_suspend' is set in kernel cmdline, debuguart needs to be reinitialized when system resumes. If 'no_console_suspend' is not set, reinitialization is not required. Note: this is only a workaround way. To solve the issue, either we don't shutdown some resources in serail driver's suspend; or we need to dynamically find out which uart is being used as console (here we hardcoded it as uart0). Signed-off-by: Guodong Xu <guodong.xu@linaro.org>
-rw-r--r--arch/arm/mach-hs/pm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mach-hs/pm.c b/arch/arm/mach-hs/pm.c
index fbcd2a9f7c2a..efbca0e555b8 100644
--- a/arch/arm/mach-hs/pm.c
+++ b/arch/arm/mach-hs/pm.c
@@ -47,6 +47,9 @@
#include <linux/irqchip/arm-gic.h>
#include <linux/irq.h>
#endif
+#ifdef CONFIG_HSK3_CONSOLE_WORKAROUND
+#include <linux/console.h>
+#endif
/* resources in power management */
struct iomap_resource {
@@ -171,7 +174,10 @@ static int wrapper_hs_godpsleep(void)
hilpm_cpu_godpsleep();
#ifdef CONFIG_HSK3_CONSOLE_WORKAROUND
- debuguart_reinit();
+ /* debuguart needs to be reinit when "no_console_suspend" is set.
+ */
+ if (!console_suspend_enabled)
+ debuguart_reinit();
#endif
return 0;