linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: imx8mn: Keep uart clocks on for early console
@ 2019-07-24  7:50 Anson.Huang
  2019-07-26  8:38 ` Abel Vesa
  2019-08-03  9:04 ` Shawn Guo
  0 siblings, 2 replies; 3+ messages in thread
From: Anson.Huang @ 2019-07-24  7:50 UTC (permalink / raw)
  To: mturquette, sboyd, shawnguo, s.hauer, kernel, festevam,
	linux-clk, linux-arm-kernel, linux-kernel
  Cc: Linux-imx

From: Anson Huang <Anson.Huang@nxp.com>

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

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/clk/imx/clk-imx8mn.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c
index 07481a5..ecd1062 100644
--- a/drivers/clk/imx/clk-imx8mn.c
+++ b/drivers/clk/imx/clk-imx8mn.c
@@ -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:
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: imx8mn: Keep uart clocks on for early console
  2019-07-24  7:50 [PATCH] clk: imx8mn: Keep uart clocks on for early console Anson.Huang
@ 2019-07-26  8:38 ` Abel Vesa
  2019-08-03  9:04 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Abel Vesa @ 2019-07-26  8:38 UTC (permalink / raw)
  To: Anson.Huang
  Cc: mturquette, sboyd, shawnguo, s.hauer, kernel, festevam,
	linux-clk, linux-arm-kernel, linux-kernel, Linux-imx

On 19-07-24 15:50:17, Anson.Huang@nxp.com wrote:
> From: Anson Huang <Anson.Huang@nxp.com>
> 
> Call imx_register_uart_clocks() API to keep uart clocks enabled
> when earlyprintk or earlycon is active.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Reviewed-by: Abel Vesa <abel.vesa@nxp.com>

> ---
>  drivers/clk/imx/clk-imx8mn.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c
> index 07481a5..ecd1062 100644
> --- a/drivers/clk/imx/clk-imx8mn.c
> +++ b/drivers/clk/imx/clk-imx8mn.c
> @@ -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:
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: imx8mn: Keep uart clocks on for early console
  2019-07-24  7:50 [PATCH] clk: imx8mn: Keep uart clocks on for early console Anson.Huang
  2019-07-26  8:38 ` Abel Vesa
@ 2019-08-03  9:04 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2019-08-03  9:04 UTC (permalink / raw)
  To: Anson.Huang
  Cc: mturquette, sboyd, s.hauer, kernel, festevam, linux-clk,
	linux-arm-kernel, linux-kernel, Linux-imx

On Wed, Jul 24, 2019 at 03:50:17PM +0800, Anson.Huang@nxp.com wrote:
> From: Anson Huang <Anson.Huang@nxp.com>
> 
> Call imx_register_uart_clocks() API to keep uart clocks enabled
> when earlyprintk or earlycon is active.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-03  9:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24  7:50 [PATCH] clk: imx8mn: Keep uart clocks on for early console Anson.Huang
2019-07-26  8:38 ` Abel Vesa
2019-08-03  9:04 ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).