From 6015f59086511c70257f64ce0f051ae21f219906 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 10 Sep 2024 01:45:29 +0200 Subject: [PATCH] cmd: clk: simplify clk command CONFIG_DM is always true. The clk command is only built if CONFIG_CLK=y. Signed-off-by: Heinrich Schuchardt --- cmd/clk.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/cmd/clk.c b/cmd/clk.c index 6fda6efb1ce..2fc834e5549 100644 --- a/cmd/clk.c +++ b/cmd/clk.c @@ -4,15 +4,12 @@ */ #include #include -#if defined(CONFIG_DM) && defined(CONFIG_CLK) #include #include #include #include #include -#endif -#if defined(CONFIG_DM) && defined(CONFIG_CLK) static void show_clks(struct udevice *dev, int depth, int last_flag) { int i, is_last; @@ -79,13 +76,6 @@ static int soc_clk_dump(void) return 0; } -#else -static int soc_clk_dump(void) -{ - puts("Not implemented\n"); - return 1; -} -#endif static int do_clk_dump(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) @@ -101,7 +91,6 @@ static int do_clk_dump(struct cmd_tbl *cmdtp, int flag, int argc, return ret; } -#if CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(CLK) static int do_clk_setfreq(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { @@ -131,13 +120,10 @@ static int do_clk_setfreq(struct cmd_tbl *cmdtp, int flag, int argc, printf("set_rate returns %u\n", freq); return 0; } -#endif static struct cmd_tbl cmd_clk_sub[] = { U_BOOT_CMD_MKENT(dump, 1, 1, do_clk_dump, "", ""), -#if CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(CLK) U_BOOT_CMD_MKENT(setfreq, 3, 1, do_clk_setfreq, "", ""), -#endif }; static int do_clk(struct cmd_tbl *cmdtp, int flag, int argc,