Skip to content

Commit 037705e

Browse files
tt-fustinibebarino
authored andcommitted
clk: thead: Add CLK_IGNORE_UNUSED to fix TH1520 boot
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: ae81b69 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks") Signed-off-by: Drew Fustini <[email protected]> Link: https://lore.kernel.org/r/20250113-th1520-clk_ignore_unused-v1-2-0b08fb813438@tenstorrent.com Signed-off-by: Stephen Boyd <[email protected]>
1 parent a826e53 commit 037705e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/clk/thead/clk-th1520-ap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ static struct ccu_div apb_pclk = {
657657
.hw.init = CLK_HW_INIT_PARENTS_DATA("apb-pclk",
658658
apb_parents,
659659
&ccu_div_ops,
660-
0),
660+
CLK_IGNORE_UNUSED),
661661
},
662662
};
663663

@@ -787,13 +787,13 @@ static CCU_GATE(CLK_X2X_CPUSYS, x2x_cpusys_clk, "x2x-cpusys", axi4_cpusys2_aclk_
787787
0x134, BIT(7), 0);
788788
static CCU_GATE(CLK_CPU2AON_X2H, cpu2aon_x2h_clk, "cpu2aon-x2h", axi_aclk_pd, 0x138, BIT(8), 0);
789789
static CCU_GATE(CLK_CPU2PERI_X2H, cpu2peri_x2h_clk, "cpu2peri-x2h", axi4_cpusys2_aclk_pd,
790-
0x140, BIT(9), 0);
790+
0x140, BIT(9), CLK_IGNORE_UNUSED);
791791
static CCU_GATE(CLK_PERISYS_APB1_HCLK, perisys_apb1_hclk, "perisys-apb1-hclk", perisys_ahb_hclk_pd,
792792
0x150, BIT(9), 0);
793793
static CCU_GATE(CLK_PERISYS_APB2_HCLK, perisys_apb2_hclk, "perisys-apb2-hclk", perisys_ahb_hclk_pd,
794-
0x150, BIT(10), 0);
794+
0x150, BIT(10), CLK_IGNORE_UNUSED);
795795
static CCU_GATE(CLK_PERISYS_APB3_HCLK, perisys_apb3_hclk, "perisys-apb3-hclk", perisys_ahb_hclk_pd,
796-
0x150, BIT(11), 0);
796+
0x150, BIT(11), CLK_IGNORE_UNUSED);
797797
static CCU_GATE(CLK_PERISYS_APB4_HCLK, perisys_apb4_hclk, "perisys-apb4-hclk", perisys_ahb_hclk_pd,
798798
0x150, BIT(12), 0);
799799
static CCU_GATE(CLK_NPU_AXI, npu_axi_clk, "npu-axi", axi_aclk_pd, 0x1c8, BIT(5), 0);

0 commit comments

Comments
 (0)