diff mbox series

clk: thead: fix dependency on clk_ignore_unused

Message ID 20240731061439.3807172-1-drew@pdp7.com (mailing list archive)
State Accepted, archived
Headers show
Series clk: thead: fix dependency on clk_ignore_unused | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR success PR summary
conchuod/patch-1-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh
conchuod/patch-1-test-2 success .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh
conchuod/patch-1-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh
conchuod/patch-1-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh
conchuod/patch-1-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh
conchuod/patch-1-test-6 success .github/scripts/patches/tests/checkpatch.sh
conchuod/patch-1-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh
conchuod/patch-1-test-8 success .github/scripts/patches/tests/header_inline.sh
conchuod/patch-1-test-9 success .github/scripts/patches/tests/kdoc.sh
conchuod/patch-1-test-10 success .github/scripts/patches/tests/module_param.sh
conchuod/patch-1-test-11 success .github/scripts/patches/tests/verify_fixes.sh
conchuod/patch-1-test-12 success .github/scripts/patches/tests/verify_signedoff.sh

Commit Message

Drew Fustini July 31, 2024, 6:14 a.m. UTC
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(-)

Comments

Stephen Boyd July 31, 2024, 9:52 p.m. UTC | #1
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
diff mbox series

Patch

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),
 	},
 };