Thread (6 messages) 6 messages, 3 authors, 2014-10-11
STALE4277d

[PATCH] serial: of-serial: fix up PM ops on no_console_suspend

From: Jingchang Lu <hidden>
Date: 2014-10-09 10:10:50
Also in: linux-serial, lkml
Subsystem: the rest, tty layer and serial drivers · Maintainers: Linus Torvalds, Greg Kroah-Hartman, Jiri Slaby

Mandatorily disabling the uart clock will cause register access
hung on "no_console_suspend". This patch add condition check on
it and only disable the clock with console_suspend_enabled true.

Signed-off-by: Joseph Lo <redacted>
Signed-off-by: Jingchang Lu <redacted>
---
 drivers/tty/serial/of_serial.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
index 8bc2563..a765399 100644
--- a/drivers/tty/serial/of_serial.c
+++ b/drivers/tty/serial/of_serial.c
@@ -246,7 +246,7 @@ static int of_serial_suspend(struct device *dev)
 	struct of_serial_info *info = dev_get_drvdata(dev);
 
 	serial8250_suspend_port(info->line);
-	if (info->clk)
+	if (info->clk && console_suspend_enabled)
 		clk_disable_unprepare(info->clk);
 
 	return 0;
@@ -256,7 +256,7 @@ static int of_serial_resume(struct device *dev)
 {
 	struct of_serial_info *info = dev_get_drvdata(dev);
 
-	if (info->clk)
+	if (info->clk && console_suspend_enabled)
 		clk_prepare_enable(info->clk);
 
 	serial8250_resume_port(info->line);
-- 
1.8.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help