From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 02/10] clk: Add support for the k210 clock driver pre-relocation
Date: Tue, 29 Sep 2020 10:18:27 -0400 [thread overview]
Message-ID: <20200929141835.38435-3-seanga2@gmail.com> (raw)
In-Reply-To: <20200929141835.38435-1-seanga2@gmail.com>
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>
---
drivers/clk/kendryte/clk.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/kendryte/clk.c b/drivers/clk/kendryte/clk.c
index 981b3b7699..7d179d755e 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 __section(.data) *k210_bypass_children;
/* Helper functions to create sub-clocks */
static struct clk_mux *k210_create_mux(const struct k210_mux_params *params,
@@ -476,7 +474,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)
{
@@ -659,5 +664,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,
};
--
2.28.0
next prev parent reply other threads:[~2020-09-29 14:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 14:18 [PATCH 00/10] riscv: k210: Enable use of AI ram bank Sean Anderson
2020-09-29 14:18 ` [PATCH 01/10] clk: k210: Fix PLLs not being enabled Sean Anderson
2020-09-29 14:18 ` Sean Anderson [this message]
2020-09-29 14:18 ` [PATCH 03/10] riscv: Enable some devices pre-relocation Sean Anderson
2020-09-29 14:18 ` [PATCH 04/10] lib: fdt: Add fdtdec_setup_mem_size_base_highest Sean Anderson
2020-10-12 3:34 ` Simon Glass
2020-09-29 14:18 ` [PATCH 05/10] test: Add a test for fdtdec_setup_mem_size_base et al Sean Anderson
2020-10-12 3:34 ` Simon Glass
2020-09-29 14:18 ` [PATCH 06/10] ram: Add driver for K210 SRAM Sean Anderson
2020-10-07 13:26 ` Simon Glass
2020-09-29 14:18 ` [PATCH 07/10] ram: sifive: Default to y only if compiling for fu540 Sean Anderson
2020-09-30 4:08 ` Pragnesh Patel
2020-09-29 14:18 ` [PATCH 08/10] riscv: Probe ram in dram_init Sean Anderson
2020-09-29 14:18 ` [PATCH 09/10] riscv: Enable AI ram on K210 Sean Anderson
2020-09-29 14:18 ` [PATCH 10/10] riscv: Don't reserve AI ram in k210 dts Sean Anderson
2020-09-29 15:03 ` Heinrich Schuchardt
2020-09-29 15:07 ` Sean Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200929141835.38435-3-seanga2@gmail.com \
--to=seanga2@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox