[PATCH v2 3/8] clk: imx27: retain early UART clocks during kernel init

Lucas Stach l.stach at pengutronix.de
Fri Sep 4 09:00:14 PDT 2015


Make sure to keep UART clocks enabled during kernel init if
earlyprintk or earlycon are active.

Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
---
 drivers/clk/imx/clk-imx27.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/clk/imx/clk-imx27.c b/drivers/clk/imx/clk-imx27.c
index d9d50d54ef2a..720adc5d7c24 100644
--- a/drivers/clk/imx/clk-imx27.c
+++ b/drivers/clk/imx/clk-imx27.c
@@ -47,6 +47,15 @@ static const char *ssi_sel_clks[] = { "spll_gate", "mpll", };
 static struct clk *clk[IMX27_CLK_MAX];
 static struct clk_onecell_data clk_data;
 
+static struct clk **uart_clks[] __initdata = { &clk[IMX27_CLK_PER1_GATE],
+					       &clk[IMX27_CLK_UART1_IPG_GATE],
+					       &clk[IMX27_CLK_UART2_IPG_GATE],
+					       &clk[IMX27_CLK_UART3_IPG_GATE],
+					       &clk[IMX27_CLK_UART4_IPG_GATE],
+					       &clk[IMX27_CLK_UART5_IPG_GATE],
+					       &clk[IMX27_CLK_UART6_IPG_GATE],
+					       NULL };
+
 static void __init _mx27_clocks_init(unsigned long fref)
 {
 	BUG_ON(!ccm);
@@ -163,6 +172,8 @@ static void __init _mx27_clocks_init(unsigned long fref)
 
 	clk_prepare_enable(clk[IMX27_CLK_EMI_AHB_GATE]);
 
+	imx_register_uart_clocks(uart_clks);
+
 	imx_print_silicon_rev("i.MX27", mx27_revision());
 }
 
-- 
2.5.0




More information about the linux-arm-kernel mailing list