diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2023-03-22 09:26:56 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-03-23 13:05:12 +0100 |
commit | 758a02ec198448ff16109d8ecdc9fbf33ea4a016 (patch) | |
tree | 27dc6de724c4b8a3ac5cbed20c5e740dbff4b5e9 /commands | |
parent | 3a1f0f58d32cde58d8f94e3622d134b848829cd9 (diff) | |
download | barebox-758a02ec198448ff16109d8ecdc9fbf33ea4a016.tar.gz barebox-758a02ec198448ff16109d8ecdc9fbf33ea4a016.tar.xz |
commands: of_overlay: Allow to register clocks from overlay
When clocks are added from an overlay calling of_probe() is enough
for devices handled by regular drivers, but not for clocks declared
with CLK_OF_DECLARE(). Additionally call of_clk_init() to support
these as well.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/of_overlay.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/commands/of_overlay.c b/commands/of_overlay.c index 37d29b88e5..b80f371c5c 100644 --- a/commands/of_overlay.c +++ b/commands/of_overlay.c @@ -10,6 +10,7 @@ #include <getopt.h> #include <libfile.h> #include <of.h> +#include <linux/clk.h> static int do_of_overlay(int argc, char *argv[]) { @@ -49,8 +50,11 @@ static int do_of_overlay(int argc, char *argv[]) if (live_tree) { ret = of_overlay_apply_tree(of_get_root_node(), overlay); - if (!ret) - ret = of_probe(); + if (ret) + goto err; + + of_clk_init(); + of_probe(); } else { ret = of_register_overlay(overlay); } |