From: Shawn Guo <shawnguo@kernel.org>
To: Anson Huang <Anson.Huang@nxp.com>
Cc: peng.fan@nxp.com, fugang.duan@nxp.com, abel.vesa@nxp.com,
sboyd@kernel.org, mturquette@baylibre.com,
linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
Linux-imx@nxp.com, kernel@pengutronix.de,
leonard.crestez@nxp.com, festevam@gmail.com,
s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org,
ping.bai@nxp.com
Subject: Re: [PATCH 1/4] clk: imx8mn: A53 core clock no need to be critical
Date: Wed, 11 Mar 2020 14:40:05 +0800 [thread overview]
Message-ID: <20200311064005.GE29269@dragon> (raw)
In-Reply-To: <1582620554-32689-1-git-send-email-Anson.Huang@nxp.com>
On Tue, Feb 25, 2020 at 04:49:11PM +0800, Anson Huang wrote:
> 'A53_CORE' is just a mux and no need to be critical, being critical
> will cause its parent clock always ON which does NOT make sense,
I do not quite understand what problem this patch is trying to fix. In
the end, all the ancestor clocks of "arm", including "arm_a53_core" will
still be ON, as "arm" has CLK_IS_CRITICAL flag. What is the difference
you are trying to make here?
Shawn
> to make sure CPU's hardware clock source NOT being disabled during
> clock tree setup, need to move the 'A53_SRC'/'A53_CORE' reparent
> operations to after critical clock 'ARM_CLK' setup finished.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
> drivers/clk/imx/clk-imx8mn.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c
> index 83618af..0bc7070 100644
> --- a/drivers/clk/imx/clk-imx8mn.c
> +++ b/drivers/clk/imx/clk-imx8mn.c
> @@ -428,7 +428,7 @@ static int imx8mn_clocks_probe(struct platform_device *pdev)
> hws[IMX8MN_CLK_GPU_SHADER_DIV] = hws[IMX8MN_CLK_GPU_SHADER];
>
> /* CORE SEL */
> - hws[IMX8MN_CLK_A53_CORE] = imx_clk_hw_mux2_flags("arm_a53_core", base + 0x9880, 24, 1, imx8mn_a53_core_sels, ARRAY_SIZE(imx8mn_a53_core_sels), CLK_IS_CRITICAL);
> + hws[IMX8MN_CLK_A53_CORE] = imx_clk_hw_mux2("arm_a53_core", base + 0x9880, 24, 1, imx8mn_a53_core_sels, ARRAY_SIZE(imx8mn_a53_core_sels));
>
> /* BUS */
> hws[IMX8MN_CLK_MAIN_AXI] = imx8m_clk_hw_composite_critical("main_axi", imx8mn_main_axi_sels, base + 0x8800);
> @@ -559,15 +559,15 @@ static int imx8mn_clocks_probe(struct platform_device *pdev)
>
> hws[IMX8MN_CLK_DRAM_ALT_ROOT] = imx_clk_hw_fixed_factor("dram_alt_root", "dram_alt", 1, 4);
>
> - clk_hw_set_parent(hws[IMX8MN_CLK_A53_SRC], hws[IMX8MN_SYS_PLL1_800M]);
> - clk_hw_set_parent(hws[IMX8MN_CLK_A53_CORE], hws[IMX8MN_ARM_PLL_OUT]);
> -
> hws[IMX8MN_CLK_ARM] = imx_clk_hw_cpu("arm", "arm_a53_core",
> hws[IMX8MN_CLK_A53_CORE]->clk,
> hws[IMX8MN_CLK_A53_CORE]->clk,
> hws[IMX8MN_ARM_PLL_OUT]->clk,
> hws[IMX8MN_CLK_A53_DIV]->clk);
>
> + clk_hw_set_parent(hws[IMX8MN_CLK_A53_SRC], hws[IMX8MN_SYS_PLL1_800M]);
> + clk_hw_set_parent(hws[IMX8MN_CLK_A53_CORE], hws[IMX8MN_ARM_PLL_OUT]);
> +
> imx_check_clk_hws(hws, IMX8MN_CLK_END);
>
> ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data);
> --
> 2.7.4
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-03-11 6:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-25 8:49 [PATCH 1/4] clk: imx8mn: A53 core clock no need to be critical Anson Huang
2020-02-25 8:49 ` [PATCH 2/4] clk: imx8mm: " Anson Huang
2020-02-25 8:49 ` [PATCH 3/4] clk: imx8mp: " Anson Huang
2020-02-25 8:49 ` [PATCH 4/4] clk: imx8mq: " Anson Huang
2020-02-25 8:58 ` [PATCH 1/4] clk: imx8mn: " Daniel Baluta
2020-02-25 9:17 ` Anson Huang
2020-03-11 6:40 ` Shawn Guo [this message]
2020-03-11 7:01 ` Anson Huang
2020-03-11 7:12 ` Shawn Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200311064005.GE29269@dragon \
--to=shawnguo@kernel.org \
--cc=Anson.Huang@nxp.com \
--cc=Linux-imx@nxp.com \
--cc=abel.vesa@nxp.com \
--cc=festevam@gmail.com \
--cc=fugang.duan@nxp.com \
--cc=kernel@pengutronix.de \
--cc=leonard.crestez@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=peng.fan@nxp.com \
--cc=ping.bai@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox