* [PATCH] clk: thead: fix dependency on clk_ignore_unused
@ 2024-07-31 6:14 Drew Fustini
2024-07-31 21:52 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Drew Fustini @ 2024-07-31 6:14 UTC (permalink / raw)
To: Emil Renner Berthing, Icenowy Zheng, Guo Ren, Fu Wei,
Michael Turquette, Stephen Boyd, linux-riscv, linux-clk,
linux-kernel
Cc: Drew Fustini
Add the CLK_IGNORE_UNUSED flag to the vp-axi clock (CLK_VP_AXI) to avoid
depending on clk_ignore_unused in the cmdline. Without this fix, the
emmc-sdio clock (CLK_EMMC_SDIO) fails to work after vp-axi is disabled.
Signed-off-by: Drew Fustini <drew@pdp7.com>
---
base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b
This is based on v6.11-rc1. I've been reviewing the TH1520 System User
Manual [1] and I am uncertain why "vp-axi" affects "emmc-sdio":
- EMMC_SDIO_REF_CLK_EN is bit 30 in PERI_CLK_CFG (offset 0x204)
- VPSYS_AXI_ACLK_EN is bit 15 in VPSYS_CLK_CFG (offsset 0x1e0)
I don't see any linkage between them in the public documentation.
However, the addition of the CLK_IGNORE_UNUSED flag to "vp-axi" does fix
the boot failure when clk_ignore_unused is not used.
I've pushed a branch that has the dts branches on top of this patch [2].
[1] https://openbeagle.org/beaglev-ahead/beaglev-ahead/-/blob/main/docs/TH1520%20System%20User%20Manual.pdf
[2] https://github.com/pdp7/linux/tree/th1520-fix-clk_ignore_unused
drivers/clk/thead/clk-th1520-ap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/thead/clk-th1520-ap.c b/drivers/clk/thead/clk-th1520-ap.c
index cbc176b27c09..17e32ae08720 100644
--- a/drivers/clk/thead/clk-th1520-ap.c
+++ b/drivers/clk/thead/clk-th1520-ap.c
@@ -738,7 +738,7 @@ static struct ccu_div vp_axi_clk = {
.hw.init = CLK_HW_INIT_PARENTS_HW("vp-axi",
video_pll_clk_parent,
&ccu_div_ops,
- 0),
+ CLK_IGNORE_UNUSED),
},
};
--
2.34.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: thead: fix dependency on clk_ignore_unused
2024-07-31 6:14 [PATCH] clk: thead: fix dependency on clk_ignore_unused Drew Fustini
@ 2024-07-31 21:52 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2024-07-31 21:52 UTC (permalink / raw)
To: Drew Fustini, Emil Renner Berthing, Fu Wei, Guo Ren,
Icenowy Zheng, Michael Turquette, linux-clk, linux-kernel,
linux-riscv
Cc: Drew Fustini
Quoting Drew Fustini (2024-07-30 23:14:40)
> Add the CLK_IGNORE_UNUSED flag to the vp-axi clock (CLK_VP_AXI) to avoid
> depending on clk_ignore_unused in the cmdline. Without this fix, the
> emmc-sdio clock (CLK_EMMC_SDIO) fails to work after vp-axi is disabled.
>
> Signed-off-by: Drew Fustini <drew@pdp7.com>
> ---
Applied to clk-fixes
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-31 21:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31 6:14 [PATCH] clk: thead: fix dependency on clk_ignore_unused Drew Fustini
2024-07-31 21:52 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox