clk: imx25: retain early UART clocks during kernel init
authorLucas Stach <l.stach@pengutronix.de>
Mon, 21 Sep 2015 16:53:58 +0000 (18:53 +0200)
committerShawn Guo <shawnguo@kernel.org>
Sat, 26 Sep 2015 04:58:47 +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-imx25.c

index ec1a4c1dacf171d5f79782b68f15ac8b5a567fa2..c4c141cab444489353be4ececa284ba789555c0c 100644 (file)
@@ -86,6 +86,16 @@ enum mx25_clks {
 
 static struct clk *clk[clk_max];
 
+static struct clk ** const uart_clks[] __initconst = {
+       &clk[uart_ipg_per],
+       &clk[uart1_ipg],
+       &clk[uart2_ipg],
+       &clk[uart3_ipg],
+       &clk[uart4_ipg],
+       &clk[uart5_ipg],
+       NULL
+};
+
 static int __init __mx25_clocks_init(unsigned long osc_rate,
                                     void __iomem *ccm_base)
 {
@@ -233,6 +243,8 @@ static int __init __mx25_clocks_init(unsigned long osc_rate,
         */
        clk_set_parent(clk[cko_sel], clk[ipg]);
 
+       imx_register_uart_clocks(uart_clks);
+
        return 0;
 }