Skip to contentSkip to conversation

clk: imx8mn: Keep uart clocks on for early console

PATCH Applied [email protected] 3 participants 3 messages Jul 24, 2019 – Aug 3, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: imx8mn: Keep uart clocks on for early console

From: Anson Huang <[email protected]>

Call imx_register_uart_clocks() API to keep uart clocks enabled when earlyprintk or earlycon is active.

---
 drivers/clk/imx/clk-imx8mn.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/clk/imx/clk-imx8mn.c +10 -0
index 07481a5..ecd1062 100644
@@ -355,6 +355,14 @@ static const char * const imx8mn_clko2_sels[] = {"osc_24m", "sys_pll2_200m", "sy
 static struct clk *clks[IMX8MN_CLK_END];
 static struct clk_onecell_data clk_data;
 
+static struct clk ** const uart_clks[] = {
+	&clks[IMX8MN_CLK_UART1_ROOT],
+	&clks[IMX8MN_CLK_UART2_ROOT],
+	&clks[IMX8MN_CLK_UART3_ROOT],
+	&clks[IMX8MN_CLK_UART4_ROOT],
+	NULL
+};
+
 static int imx8mn_clocks_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -612,6 +620,8 @@ static int imx8mn_clocks_probe(struct platform_device *pdev)
 		goto unregister_clks;
 	}
 
+	imx_register_uart_clocks(uart_clks);
+
 	return 0;
 
 unregister_clks:
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · On 19-07-24 15:50:17, [email protected] wrote:

From: Anson Huang <[email protected]>

Call imx_register_uart_clocks() API to keep uart clocks enabled when earlyprintk or earlycon is active.

Quoted 35 lines
---
 drivers/clk/imx/clk-imx8mn.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/clk/imx/clk-imx8mn.c +10 -0
index 07481a5..ecd1062 100644
@@ -355,6 +355,14 @@ static const char * const imx8mn_clko2_sels[] = {"osc_24m", "sys_pll2_200m", "sy
 static struct clk *clks[IMX8MN_CLK_END];
 static struct clk_onecell_data clk_data;
 
+static struct clk ** const uart_clks[] = {
+	&clks[IMX8MN_CLK_UART1_ROOT],
+	&clks[IMX8MN_CLK_UART2_ROOT],
+	&clks[IMX8MN_CLK_UART3_ROOT],
+	&clks[IMX8MN_CLK_UART4_ROOT],
+	NULL
+};
+
 static int imx8mn_clocks_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -612,6 +620,8 @@ static int imx8mn_clocks_probe(struct platform_device *pdev)
 		goto unregister_clks;
 	}
 
+	imx_register_uart_clocks(uart_clks);
+
 	return 0;
 
 unregister_clks:
Signature · 1 line
2.7.4