[PATCH RFC 31/40] cmd/clk: add CCF_FULL support
Casey Connolly <[email protected]> Thu, 19 Mar 2026 21:56:53 +0100
| Newsgroups | io.groups.u-boot-amlogic,org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <[email protected]> |
This functionality can be expanded later, for now just support calling clk_summary_show() to dump CCF state. Signed-off-by: Casey Connolly <[email protected]> --- cmd/clk.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cmd/clk.c b/cmd/clk.c index 1210a84ca2aa..1f1888b8fd94 100644 --- a/cmd/clk.c +++ b/cmd/clk.c @@ -9,8 +9,9 @@ #include <dm/root.h> #include <dm/device-internal.h> #include <linux/clk-provider.h> +#if !CONFIG_IS_ENABLED(CLK_CCF_FULL) static void show_clks(struct udevice *dev, int depth, int last_flag) { int i, is_last; struct udevice *child; @@ -119,8 +120,26 @@ static int do_clk_setfreq(struct cmd_tbl *cmdtp, int flag, int argc, printf("set_rate returns %u\n", freq); return 0; } +#else + +void clk_summary_show(void); + +static int do_clk_dump(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + clk_summary_show(); + return 0; +} + +static int do_clk_setfreq(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + return 0; +} + +#endif static struct cmd_tbl cmd_clk_sub[] = { U_BOOT_CMD_MKENT(dump, 1, 1, do_clk_dump, "", ""), U_BOOT_CMD_MKENT(setfreq, 3, 1, do_clk_setfreq, "", ""), -- 2.51.0