From: b32955@freescale.com (Huang Shijie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] serial: imx: enable the clocks for console
Date: Sat, 8 Jun 2013 16:04:27 +0800 [thread overview]
Message-ID: <1370678667-3514-1-git-send-email-b32955@freescale.com> (raw)
In-Reply-To: <20130608062307.GB22416@S2101-09.ap.freescale.net>
The console's clocks are disabled after the uart driver is probed.
It makes that we can see less log from the console now
(though we still can get all the log by the `dmesg`).
So enable the clocks for console, and we can see all the log again.
Signed-off-by: Huang Shijie <b32955@freescale.com>
---
drivers/tty/serial/imx.c | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 7a761f7..b86587f 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -702,13 +702,14 @@ static int imx_startup(struct uart_port *port)
int retval;
unsigned long flags, temp;
- retval = clk_prepare_enable(sport->clk_per);
- if (retval)
- goto error_out1;
-
- retval = clk_prepare_enable(sport->clk_ipg);
- if (retval)
- goto error_out1;
+ if (!uart_console(port)) {
+ retval = clk_prepare_enable(sport->clk_per);
+ if (retval)
+ goto error_out1;
+ retval = clk_prepare_enable(sport->clk_ipg);
+ if (retval)
+ goto error_out1;
+ }
imx_setup_ufcr(sport, 0);
@@ -1578,8 +1579,10 @@ static int serial_imx_probe(struct platform_device *pdev)
goto deinit;
platform_set_drvdata(pdev, sport);
- clk_disable_unprepare(sport->clk_per);
- clk_disable_unprepare(sport->clk_ipg);
+ if (!uart_console(&sport->port)) {
+ clk_disable_unprepare(sport->clk_per);
+ clk_disable_unprepare(sport->clk_ipg);
+ }
return 0;
deinit:
--
1.7.1
next prev parent reply other threads:[~2013-06-08 8:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-04 1:59 [PATCH V2] serial: imx: enable the clocks only when the uart is used Huang Shijie
2013-06-08 6:01 ` Shawn Guo
2013-06-08 6:22 ` Huang Shijie
2013-06-08 6:23 ` Shawn Guo
2013-06-08 8:04 ` Huang Shijie [this message]
2013-06-08 13:11 ` [PATCH] serial: imx: enable the clocks for console Fabio Estevam
2013-06-09 2:01 ` [PATCH v2] " Huang Shijie
2013-06-09 8:34 ` Shawn Guo
2013-06-09 13:05 ` Shawn Guo
2013-06-09 17:26 ` Greg KH
2013-06-10 0:55 ` Shawn Guo
2013-06-09 2:17 ` [PATCH] " Huang Shijie
2013-06-08 11:56 ` Re[2]: [PATCH V2] serial: imx: enable the clocks only when the uart is used Alexander Shiyan
2013-06-08 8:15 ` Russell King - ARM Linux
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=1370678667-3514-1-git-send-email-b32955@freescale.com \
--to=b32955@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).