serial: imx: enable the clocks for console

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.

This patch also disables the sport->clk_per when we fail to enable
the sport->clk_ipg;

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Huang Shijie 2013-06-09 10:01:19 +08:00 коммит произвёл Greg Kroah-Hartman
Родитель c9e2e946fb
Коммит 0c375501be
1 изменённых файлов: 14 добавлений и 9 удалений

Просмотреть файл

@ -702,13 +702,16 @@ static int imx_startup(struct uart_port *port)
int retval; int retval;
unsigned long flags, temp; unsigned long flags, temp;
retval = clk_prepare_enable(sport->clk_per); if (!uart_console(port)) {
if (retval) retval = clk_prepare_enable(sport->clk_per);
goto error_out1; if (retval)
goto error_out1;
retval = clk_prepare_enable(sport->clk_ipg); retval = clk_prepare_enable(sport->clk_ipg);
if (retval) if (retval) {
goto error_out1; clk_disable_unprepare(sport->clk_per);
goto error_out1;
}
}
imx_setup_ufcr(sport, 0); imx_setup_ufcr(sport, 0);
@ -1578,8 +1581,10 @@ static int serial_imx_probe(struct platform_device *pdev)
goto deinit; goto deinit;
platform_set_drvdata(pdev, sport); platform_set_drvdata(pdev, sport);
clk_disable_unprepare(sport->clk_per); if (!uart_console(&sport->port)) {
clk_disable_unprepare(sport->clk_ipg); clk_disable_unprepare(sport->clk_per);
clk_disable_unprepare(sport->clk_ipg);
}
return 0; return 0;
deinit: deinit: