From: Heinrich Schuchardt Date: Mon, 9 Sep 2024 23:45:29 +0000 (+0200) Subject: cmd: clk: simplify clk command X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-favicon.png?a=commitdiff_plain;h=6015f59086511c70257f64ce0f051ae21f219906;p=u-boot.git 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 --- diff --git a/cmd/clk.c b/cmd/clk.c index 6fda6efb1c..2fc834e554 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,