From: jingchang.lu@freescale.com (Jingchang Lu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] serial: of-serial: fix up PM ops on no_console_suspend
Date: Thu, 9 Oct 2014 17:10:52 +0800 [thread overview]
Message-ID: <1412845852-26157-1-git-send-email-jingchang.lu@freescale.com> (raw)
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@nvidia.com>
Signed-off-by: Jingchang Lu <jingchang.lu@freescale.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
next reply other threads:[~2014-10-09 9:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-09 9:10 Jingchang Lu [this message]
2014-10-10 5:04 ` [PATCH] serial: of-serial: fix up PM ops on no_console_suspend Stephen Warren
2014-10-10 6:16 ` Jingchang Lu
2014-10-10 10:25 ` Peter Hurley
2014-10-10 11:39 ` Peter Hurley
2014-10-11 3:37 ` Jingchang Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1412845852-26157-1-git-send-email-jingchang.lu@freescale.com \
--to=jingchang.lu@freescale.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).