* [PATCH RESEND 1/2] clk: thead: Fix clk gate registration to pass flags
2025-01-13 20:31 [PATCH RESEND 0/2] clk: thead: Fix TH1520 boot dependency on clk_ignore_unused Drew Fustini
@ 2025-01-13 20:31 ` Drew Fustini
2025-01-13 21:38 ` Stephen Boyd
2025-01-13 20:31 ` [PATCH RESEND 2/2] clk: thead: Add CLK_IGNORE_UNUSED to fix TH1520 boot Drew Fustini
2025-02-03 19:15 ` [PATCH RESEND 0/2] clk: thead: Fix TH1520 boot dependency on clk_ignore_unused patchwork-bot+linux-riscv
2 siblings, 1 reply; 6+ messages in thread
From: Drew Fustini @ 2025-01-13 20:31 UTC (permalink / raw)
To: Drew Fustini, Guo Ren, Fu Wei, Michael Turquette, Stephen Boyd,
Jisheng Zhang, Yangtao Li
Cc: linux-riscv, linux-clk, linux-kernel, Drew Fustini
Modify the call to devm_clk_hw_register_gate_parent_data() to actually
pass the clk flags from hw.init instead of just 0. This is necessary to
allow individual clk gates to specify their own clk flags.
Fixes: ae81b69fd2b1 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks")
Signed-off-by: Drew Fustini <dfustini@tenstorrent.com>
---
drivers/clk/thead/clk-th1520-ap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/thead/clk-th1520-ap.c b/drivers/clk/thead/clk-th1520-ap.c
index 1015fab95251..c95b6e26ca53 100644
--- a/drivers/clk/thead/clk-th1520-ap.c
+++ b/drivers/clk/thead/clk-th1520-ap.c
@@ -1048,7 +1048,8 @@ static int th1520_clk_probe(struct platform_device *pdev)
hw = devm_clk_hw_register_gate_parent_data(dev,
cg->common.hw.init->name,
cg->common.hw.init->parent_data,
- 0, base + cg->common.cfg0,
+ cg->common.hw.init->flags,
+ base + cg->common.cfg0,
ffs(cg->enable) - 1, 0, NULL);
if (IS_ERR(hw))
return PTR_ERR(hw);
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH RESEND 2/2] clk: thead: Add CLK_IGNORE_UNUSED to fix TH1520 boot
2025-01-13 20:31 [PATCH RESEND 0/2] clk: thead: Fix TH1520 boot dependency on clk_ignore_unused Drew Fustini
2025-01-13 20:31 ` [PATCH RESEND 1/2] clk: thead: Fix clk gate registration to pass flags Drew Fustini
@ 2025-01-13 20:31 ` Drew Fustini
2025-01-13 21:38 ` Stephen Boyd
2025-02-03 19:15 ` [PATCH RESEND 0/2] clk: thead: Fix TH1520 boot dependency on clk_ignore_unused patchwork-bot+linux-riscv
2 siblings, 1 reply; 6+ messages in thread
From: Drew Fustini @ 2025-01-13 20:31 UTC (permalink / raw)
To: Drew Fustini, Guo Ren, Fu Wei, Michael Turquette, Stephen Boyd,
Jisheng Zhang, Yangtao Li
Cc: linux-riscv, linux-clk, linux-kernel, Drew Fustini
Add the CLK_IGNORE_UNUSED flag to apb_pclk, cpu2peri_x2h_clk,
perisys_apb2_hclk and perisys_apb3_hclk.
Without this flag, the boot hangs after "clk: Disabling unused clocks"
unless clk_ignore_unused is in the kernel cmdline.
Fixes: ae81b69fd2b1 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks")
Signed-off-by: Drew Fustini <dfustini@tenstorrent.com>
---
drivers/clk/thead/clk-th1520-ap.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/thead/clk-th1520-ap.c b/drivers/clk/thead/clk-th1520-ap.c
index c95b6e26ca53..d02a18fed8a8 100644
--- a/drivers/clk/thead/clk-th1520-ap.c
+++ b/drivers/clk/thead/clk-th1520-ap.c
@@ -657,7 +657,7 @@ static struct ccu_div apb_pclk = {
.hw.init = CLK_HW_INIT_PARENTS_DATA("apb-pclk",
apb_parents,
&ccu_div_ops,
- 0),
+ CLK_IGNORE_UNUSED),
},
};
@@ -794,13 +794,13 @@ static CCU_GATE(CLK_X2X_CPUSYS, x2x_cpusys_clk, "x2x-cpusys", axi4_cpusys2_aclk_
0x134, BIT(7), 0);
static CCU_GATE(CLK_CPU2AON_X2H, cpu2aon_x2h_clk, "cpu2aon-x2h", axi_aclk_pd, 0x138, BIT(8), 0);
static CCU_GATE(CLK_CPU2PERI_X2H, cpu2peri_x2h_clk, "cpu2peri-x2h", axi4_cpusys2_aclk_pd,
- 0x140, BIT(9), 0);
+ 0x140, BIT(9), CLK_IGNORE_UNUSED);
static CCU_GATE(CLK_PERISYS_APB1_HCLK, perisys_apb1_hclk, "perisys-apb1-hclk", perisys_ahb_hclk_pd,
0x150, BIT(9), 0);
static CCU_GATE(CLK_PERISYS_APB2_HCLK, perisys_apb2_hclk, "perisys-apb2-hclk", perisys_ahb_hclk_pd,
- 0x150, BIT(10), 0);
+ 0x150, BIT(10), CLK_IGNORE_UNUSED);
static CCU_GATE(CLK_PERISYS_APB3_HCLK, perisys_apb3_hclk, "perisys-apb3-hclk", perisys_ahb_hclk_pd,
- 0x150, BIT(11), 0);
+ 0x150, BIT(11), CLK_IGNORE_UNUSED);
static CCU_GATE(CLK_PERISYS_APB4_HCLK, perisys_apb4_hclk, "perisys-apb4-hclk", perisys_ahb_hclk_pd,
0x150, BIT(12), 0);
static CCU_GATE(CLK_NPU_AXI, npu_axi_clk, "npu-axi", axi_aclk_pd, 0x1c8, BIT(5), 0);
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH RESEND 0/2] clk: thead: Fix TH1520 boot dependency on clk_ignore_unused
2025-01-13 20:31 [PATCH RESEND 0/2] clk: thead: Fix TH1520 boot dependency on clk_ignore_unused Drew Fustini
2025-01-13 20:31 ` [PATCH RESEND 1/2] clk: thead: Fix clk gate registration to pass flags Drew Fustini
2025-01-13 20:31 ` [PATCH RESEND 2/2] clk: thead: Add CLK_IGNORE_UNUSED to fix TH1520 boot Drew Fustini
@ 2025-02-03 19:15 ` patchwork-bot+linux-riscv
2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+linux-riscv @ 2025-02-03 19:15 UTC (permalink / raw)
To: Drew Fustini
Cc: linux-riscv, drew, guoren, wefu, mturquette, sboyd, jszhang,
frank.li, linux-clk, linux-kernel
Hello:
This series was applied to riscv/linux.git (fixes)
by Stephen Boyd <sboyd@kernel.org>:
On Mon, 13 Jan 2025 12:31:23 -0800 you wrote:
> Add the CLK_IGNORE_UNUSED flag to apb_pclk, cpu2peri_x2h_clk,
> perisys_apb2_hclk and perisys_apb3_hclk. Without this flag, the boot
> hangs after "clk: Disabling unused clocks" unless clk_ignore_unused
> is in the kernel cmdline.
>
> In order to allow individual clk gates to specify their own flags,
> the call to devm_clk_hw_register_gate_parent_data() is changeed to
> actually pass the clk flags instead of just 0.
>
> [...]
Here is the summary with links:
- [RESEND,1/2] clk: thead: Fix clk gate registration to pass flags
https://git.kernel.org/riscv/c/a826e53fd78c
- [RESEND,2/2] clk: thead: Add CLK_IGNORE_UNUSED to fix TH1520 boot
https://git.kernel.org/riscv/c/037705e94bf6
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread