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-04-23 18:28:18 +0800
commit140703ba2631a58050cddedaa5ac03d11bf59878 (patch)
tree0f5094529c053d4dcb30b357e20b3029fdd8a609
parent1ac70566e9f111285a3614a31ab5bd2c84f8d055 (diff)
pm: mach-hs: workaround, reinit uart when 'no_console_suspend'topic-suspend-resume-m3
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 ca6acabe1e60..05df7a8f0374 100644
--- a/arch/arm/mach-hs/pm.c
+++ b/arch/arm/mach-hs/pm.c
@@ -47,6 +47,9 @@
#include <asm/hardware/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;