* [PATCH 1/2] clk: imx: cpu clock should be always critical
@ 2018-10-17 6:11 Anson Huang
2018-10-17 6:12 ` [PATCH 2/2] clk: imx7d: remove CLK_IS_CRITICAL flag for arm_a7_root_clk Anson Huang
2018-10-17 15:26 ` [PATCH 1/2] clk: imx: cpu clock should be always critical Stephen Boyd
0 siblings, 2 replies; 5+ messages in thread
From: Anson Huang @ 2018-10-17 6:11 UTC (permalink / raw)
To: shawnguo, s.hauer, kernel, Fabio Estevam, mturquette, sboyd,
linux-arm-kernel, linux-clk, linux-kernel
Cc: dl-linux-imx
Add CLK_IS_CRITICAL flag for cpu clock type to
make cpu clock use count correct, as cpu clock
should be always critical.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
drivers/clk/imx/clk-cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/imx/clk-cpu.c b/drivers/clk/imx/clk-cpu.c
index 9d46eac..ed1b7e9 100644
--- a/drivers/clk/imx/clk-cpu.c
+++ b/drivers/clk/imx/clk-cpu.c
@@ -94,7 +94,7 @@ struct clk *imx_clk_cpu(const char *name, const char *parent_name,
init.name = name;
init.ops = &clk_cpu_ops;
- init.flags = 0;
+ init.flags = CLK_IS_CRITICAL;
init.parent_names = &parent_name;
init.num_parents = 1;
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] clk: imx7d: remove CLK_IS_CRITICAL flag for arm_a7_root_clk
2018-10-17 6:11 [PATCH 1/2] clk: imx: cpu clock should be always critical Anson Huang
@ 2018-10-17 6:12 ` Anson Huang
2018-10-17 15:25 ` Stephen Boyd
2018-10-17 15:26 ` Stephen Boyd
2018-10-17 15:26 ` [PATCH 1/2] clk: imx: cpu clock should be always critical Stephen Boyd
1 sibling, 2 replies; 5+ messages in thread
From: Anson Huang @ 2018-10-17 6:12 UTC (permalink / raw)
To: shawnguo, s.hauer, kernel, Fabio Estevam, mturquette, sboyd,
linux-arm-kernel, linux-clk, linux-kernel
Cc: dl-linux-imx
i.MX7D uses virtual cpu clock of "arm" clock to be child clock
of "arm_a7_root_clk" and it is with CLK_IS_CRITICAL flag set, so
no need to add CLK_IS_CRITICAL flag for keeping "arm_a7_root_clk"
use count correct, latest clock tree is as below in clk_summary:
pll_arm_main 1 1 0 792000000 0
pll_arm_main_bypass 1 1 0 792000000 0
pll_arm_main_clk 1 1 0 792000000 0
arm_a7_src 1 1 0 792000000 0
arm_a7_cg 1 1 0 792000000 0
arm_a7_div 1 1 0 792000000 0
arm_a7_root_clk 1 1 0 792000000 0
arm 1 1 0 792000000
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
drivers/clk/imx/clk-imx7d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c
index 076460b..adb08f6 100644
--- a/drivers/clk/imx/clk-imx7d.c
+++ b/drivers/clk/imx/clk-imx7d.c
@@ -775,7 +775,7 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node)
clks[IMX7D_CLKO1_ROOT_DIV] = imx_clk_divider2("clko1_post_div", "clko1_pre_div", base + 0xbd80, 0, 6);
clks[IMX7D_CLKO2_ROOT_DIV] = imx_clk_divider2("clko2_post_div", "clko2_pre_div", base + 0xbe00, 0, 6);
- clks[IMX7D_ARM_A7_ROOT_CLK] = imx_clk_gate2_flags("arm_a7_root_clk", "arm_a7_div", base + 0x4000, 0, CLK_IS_CRITICAL | CLK_OPS_PARENT_ENABLE);
+ clks[IMX7D_ARM_A7_ROOT_CLK] = imx_clk_gate2_flags("arm_a7_root_clk", "arm_a7_div", base + 0x4000, 0, CLK_OPS_PARENT_ENABLE);
clks[IMX7D_ARM_M4_ROOT_CLK] = imx_clk_gate4("arm_m4_root_clk", "arm_m4_div", base + 0x4010, 0);
clks[IMX7D_MAIN_AXI_ROOT_CLK] = imx_clk_gate2_flags("main_axi_root_clk", "axi_post_div", base + 0x4040, 0, CLK_IS_CRITICAL | CLK_OPS_PARENT_ENABLE);
clks[IMX7D_DISP_AXI_ROOT_CLK] = imx_clk_gate4("disp_axi_root_clk", "disp_axi_post_div", base + 0x4050, 0);
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] clk: imx7d: remove CLK_IS_CRITICAL flag for arm_a7_root_clk
2018-10-17 6:12 ` [PATCH 2/2] clk: imx7d: remove CLK_IS_CRITICAL flag for arm_a7_root_clk Anson Huang
@ 2018-10-17 15:25 ` Stephen Boyd
2018-10-17 15:26 ` Stephen Boyd
1 sibling, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2018-10-17 15:25 UTC (permalink / raw)
To: kernel, linux-arm-kernel, linux-clk, linux-kernel, mturquette,
s.hauer, shawnguo, Anson Huang, Fabio Estevam
Cc: dl-linux-imx
Quoting Anson Huang (2018-10-16 23:12:04)
> i.MX7D uses virtual cpu clock of "arm" clock to be child clock
This statement is concerning. Why do we have virtual clks?
> of "arm_a7_root_clk" and it is with CLK_IS_CRITICAL flag set, so
> no need to add CLK_IS_CRITICAL flag for keeping "arm_a7_root_clk"
> use count correct, latest clock tree is as below in clk_summary:
>
> pll_arm_main 1 1 0 792000000 0
> pll_arm_main_bypass 1 1 0 792000000 0
> pll_arm_main_clk 1 1 0 792000000 0
> arm_a7_src 1 1 0 792000000 0
> arm_a7_cg 1 1 0 792000000 0
> arm_a7_div 1 1 0 792000000 0
> arm_a7_root_clk 1 1 0 792000000 0
> arm 1 1 0 792000000
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] clk: imx: cpu clock should be always critical
2018-10-17 6:11 [PATCH 1/2] clk: imx: cpu clock should be always critical Anson Huang
2018-10-17 6:12 ` [PATCH 2/2] clk: imx7d: remove CLK_IS_CRITICAL flag for arm_a7_root_clk Anson Huang
@ 2018-10-17 15:26 ` Stephen Boyd
1 sibling, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2018-10-17 15:26 UTC (permalink / raw)
To: kernel, linux-arm-kernel, linux-clk, linux-kernel, mturquette,
s.hauer, shawnguo, Anson Huang, Fabio Estevam
Cc: dl-linux-imx
Quoting Anson Huang (2018-10-16 23:11:59)
> Add CLK_IS_CRITICAL flag for cpu clock type to
> make cpu clock use count correct, as cpu clock
> should be always critical.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] clk: imx7d: remove CLK_IS_CRITICAL flag for arm_a7_root_clk
2018-10-17 6:12 ` [PATCH 2/2] clk: imx7d: remove CLK_IS_CRITICAL flag for arm_a7_root_clk Anson Huang
2018-10-17 15:25 ` Stephen Boyd
@ 2018-10-17 15:26 ` Stephen Boyd
1 sibling, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2018-10-17 15:26 UTC (permalink / raw)
To: kernel, linux-arm-kernel, linux-clk, linux-kernel, mturquette,
s.hauer, shawnguo, Anson Huang, Fabio Estevam
Cc: dl-linux-imx
Quoting Anson Huang (2018-10-16 23:12:04)
> i.MX7D uses virtual cpu clock of "arm" clock to be child clock
> of "arm_a7_root_clk" and it is with CLK_IS_CRITICAL flag set, so
> no need to add CLK_IS_CRITICAL flag for keeping "arm_a7_root_clk"
> use count correct, latest clock tree is as below in clk_summary:
>
> pll_arm_main 1 1 0 792000000 0
> pll_arm_main_bypass 1 1 0 792000000 0
> pll_arm_main_clk 1 1 0 792000000 0
> arm_a7_src 1 1 0 792000000 0
> arm_a7_cg 1 1 0 792000000 0
> arm_a7_div 1 1 0 792000000 0
> arm_a7_root_clk 1 1 0 792000000 0
> arm 1 1 0 792000000
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-10-17 15:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-17 6:11 [PATCH 1/2] clk: imx: cpu clock should be always critical Anson Huang
2018-10-17 6:12 ` [PATCH 2/2] clk: imx7d: remove CLK_IS_CRITICAL flag for arm_a7_root_clk Anson Huang
2018-10-17 15:25 ` Stephen Boyd
2018-10-17 15:26 ` Stephen Boyd
2018-10-17 15:26 ` [PATCH 1/2] clk: imx: cpu clock should be always critical Stephen Boyd
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).