summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/imx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/imx.c')
-rw-r--r--drivers/tty/serial/imx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 4cb727056a55..f376458ae3bc 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -932,6 +932,8 @@ static int imx_startup(struct uart_port *port)
unsigned long flags, temp;
struct tty_struct *tty;
+ clk_enable(sport->clk);
+
#ifndef CONFIG_SERIAL_CORE_CONSOLE
imx_setup_ufcr(sport, 0);
#endif
@@ -1162,6 +1164,7 @@ static void imx_shutdown(struct uart_port *port)
writel(temp, sport->port.membase + UCR4);
}
spin_unlock_irqrestore(&sport->port.lock, flags);
+ clk_disable(sport->clk);
}
static void
@@ -1708,6 +1711,7 @@ static int serial_imx_probe(struct platform_device *pdev)
goto deinit;
platform_set_drvdata(pdev, &sport->port);
+ clk_disable(sport->clk);
return 0;
deinit:
if (pdata && pdata->exit)
@@ -1737,8 +1741,6 @@ static int serial_imx_remove(struct platform_device *pdev)
clk_put(sport->clk);
}
- clk_disable(sport->clk);
-
if (pdata && pdata->exit)
pdata->exit(pdev);