Skip to content

[PW_SID:992135] clk: thead: th1520-ap: allow gate cascade and fix padctrl0 - #787

Closed
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw992135
Closed

[PW_SID:992135] clk: thead: th1520-ap: allow gate cascade and fix padctrl0#787
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw992135

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 992135 applied to workflow__riscv__fixes

Name: clk: thead: th1520-ap: allow gate cascade and fix padctrl0
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=992135
Version: 2

Similar to previous situation of mux clocks, the gate clocks of
clk-th1520-ap drivers are also using a helper that creates a temporary
struct clk_hw and abandons the struct clk_hw in struct ccu_common, which
prevents clock gates to be clock parents.

Do the similar refactor of dropping struct ccu_common and directly use
struct clk_gate here.

This patch mimics the refactor done on struct ccu_mux at [1].

[1] https://lore.kernel.org/all/20250722080535.60027-2-ziyao@disroot.org/

Fixes: ae81b69 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks")
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Drew Fustini <fustini@kernel.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The padctrl0 clock seems to be a child of the perisys_apb4_hclk clock,
gating the later makes padctrl0 registers stuck too.

Fix this relationship.

Fixes: ae81b69 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks")
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Drew Fustini <fustini@kernel.org>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.dev>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2,1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 103.74 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2,1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1121.83 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2,1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1588.78 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2,1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.66 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2,1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.90 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2,1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.72 seconds
Result: WARNING
Output:

WARNING: Argument '_flags' is not used in function-like macro
#47: FILE: drivers/clk/thead/clk-th1520-ap.c:91:
+#define CCU_GATE(_clkid, _struct, _name, _parent, _reg, _bit, _flags)	\
 	struct ccu_gate _struct = {					\
+		.clkid	= _clkid,					\
+		.reg	= _reg,						\
+		.gate	= {						\
+			.bit_idx	= _bit,				\
 			.hw.init	= CLK_HW_INIT_PARENTS_DATA(	\
 						_name,			\
 						_parent,		\

total: 0 errors, 1 warnings, 0 checks, 473 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 847e13cfa5a4 ("clk: thead: th1520-ap: describe gate clocks with clk_gate") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 473 lines checked
WARNING: Argument '_flags' is not used in function-like macro


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2,1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 74.77 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2,1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2,1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2,1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2,1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v2,1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v2,2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 103.53 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v2,2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1123.94 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v2,2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1565.07 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v2,2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.80 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v2,2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.91 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v2,2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.74 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v2,2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 74.87 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v2,2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v2,2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock"
kdoc
Desc: Detects for kdoc errors
Duration: 0.85 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v2,2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v2,2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v2,2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot deleted the pw992135 branch August 16, 2025 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants