aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/imx.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 7a761f7c9781..78f809759ed7 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -702,13 +702,16 @@ static int imx_startup(struct uart_port *port)
702 int retval; 702 int retval;
703 unsigned long flags, temp; 703 unsigned long flags, temp;
704 704
705 retval = clk_prepare_enable(sport->clk_per); 705 if (!uart_console(port)) {
706 if (retval) 706 retval = clk_prepare_enable(sport->clk_per);
707 goto error_out1; 707 if (retval)
708 708 goto error_out1;
709 retval = clk_prepare_enable(sport->clk_ipg); 709 retval = clk_prepare_enable(sport->clk_ipg);
710 if (retval) 710 if (retval) {
711 goto error_out1; 711 clk_disable_unprepare(sport->clk_per);
712 goto error_out1;
713 }
714 }
712 715
713 imx_setup_ufcr(sport, 0); 716 imx_setup_ufcr(sport, 0);
714 717
@@ -1578,8 +1581,10 @@ static int serial_imx_probe(struct platform_device *pdev)
1578 goto deinit; 1581 goto deinit;
1579 platform_set_drvdata(pdev, sport); 1582 platform_set_drvdata(pdev, sport);
1580 1583
1581 clk_disable_unprepare(sport->clk_per); 1584 if (!uart_console(&sport->port)) {
1582 clk_disable_unprepare(sport->clk_ipg); 1585 clk_disable_unprepare(sport->clk_per);
1586 clk_disable_unprepare(sport->clk_ipg);
1587 }
1583 1588
1584 return 0; 1589 return 0;
1585deinit: 1590deinit: