clk: imx35: retain early UART clocks during kernel init
authorLucas Stach <l.stach@pengutronix.de>
Mon, 21 Sep 2015 16:54:01 +0000 (18:54 +0200)
committerShawn Guo <shawnguo@kernel.org>
Sat, 26 Sep 2015 04:58:56 +0000 (21:58 -0700)
Make sure to keep UART clocks enabled during kernel init if
earlyprintk or earlycon are active.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/clk/imx/clk-imx35.c

index 76c463dcdb1c4dbcbfec002ff6df37dcc6fce2ad..a71d24cb4c06b511c32f8d3b4a2a0f964ad48af2 100644 (file)
@@ -84,6 +84,14 @@ enum mx35_clks {
 
 static struct clk *clk[clk_max];
 
+static struct clk ** const uart_clks[] __initconst = {
+       &clk[ipg],
+       &clk[uart1_gate],
+       &clk[uart2_gate],
+       &clk[uart3_gate],
+       NULL
+};
+
 static void __init _mx35_clocks_init(void)
 {
        void __iomem *base;
@@ -237,6 +245,8 @@ static void __init _mx35_clocks_init(void)
         */
        clk_prepare_enable(clk[scc_gate]);
 
+       imx_register_uart_clocks(uart_clks);
+
        imx_print_silicon_rev("i.MX35", mx35_revision());
 }