diff options
author | Sean Anderson <seanga2@gmail.com> | 2021-04-09 05:13:08 +0300 |
---|---|---|
committer | Leo Yu-Chi Liang <ycliang@andestech.com> | 2021-05-14 11:20:48 +0300 |
commit | 09ad08fa1a426c0638ef79fd34996c9e7d8c0512 (patch) | |
tree | 52aea484e065f6fd0b85df1d4427f2f203fae279 /drivers/clk | |
parent | 800c7f6a1fadd6f954e5bac1515cda2231a78464 (diff) | |
download | u-boot-09ad08fa1a426c0638ef79fd34996c9e7d8c0512.tar.xz |
clk: Add support for the k210 clock driver pre-relocation
Variables which had previously been stored in .bss are moved to .data. In
addition, probed needs to be reset when the clock driver is re-bound
post-relocation.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/kendryte/clk.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/clk/kendryte/clk.c b/drivers/clk/kendryte/clk.c index 5091f07eb0..2d6ac03693 100644 --- a/drivers/clk/kendryte/clk.c +++ b/drivers/clk/kendryte/clk.c @@ -347,9 +347,7 @@ static const struct k210_comp_params k210_comps[] = { #undef COMP_NOMUX_ID #undef COMP_LIST -static struct clk *k210_bypass_children = { - NULL, -}; +static struct clk *k210_bypass_children __section(.data); /* Helper functions to create sub-clocks */ static struct clk_mux *k210_create_mux(const struct k210_mux_params *params, @@ -475,7 +473,14 @@ cleanup_mux: return comp; } -static bool probed; +static bool __section(.data) probed; + +/* reset probed so we will probe again post-relocation */ +static int k210_clk_bind(struct udevice *dev) +{ + probed = false; + return 0; +} static int k210_clk_probe(struct udevice *dev) { @@ -658,5 +663,6 @@ U_BOOT_DRIVER(k210_clk) = { .id = UCLASS_CLK, .of_match = k210_clk_ids, .ops = &k210_clk_ops, + .bind = k210_clk_bind, .probe = k210_clk_probe, }; |