[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1412845852-26157-1-git-send-email-jingchang.lu@freescale.com>
Date: Thu, 9 Oct 2014 17:10:52 +0800
From: Jingchang Lu <jingchang.lu@...escale.com>
To: <gregkh@...uxfoundation.org>
CC: <arnd@...db.de>, <linux-serial@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
Jingchang Lu <jingchang.lu@...escale.com>,
Joseph Lo <josephl@...dia.com>
Subject: [PATCH] serial: of-serial: fix up PM ops on no_console_suspend
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 <josephl@...dia.com>
Signed-off-by: Jingchang Lu <jingchang.lu@...escale.com>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists