summaryrefslogtreecommitdiff
path: root/include/clk
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2022-05-09 00:29:31 -0500
committerAndre Przywara <andre.przywara@arm.com>2022-07-18 09:37:49 +0100
commit49b2b0a2b6782609a9977095d9c80391de463044 (patch)
treeca567301a683d51babeed8d50c7ad20519ad2ae1 /include/clk
parent26f6f7fb5c0651d65afdee6d8ed36063606179a8 (diff)
downloadu-boot-49b2b0a2b6782609a9977095d9c80391de463044.tar.gz
u-boot-49b2b0a2b6782609a9977095d9c80391de463044.tar.bz2
u-boot-49b2b0a2b6782609a9977095d9c80391de463044.zip
clk: sunxi: Store the array sizes in the CCU descriptor
The reset array size is currently used for bounds checking in the reset driver. The same bounds check should really be done in the clock driver. Currently, the array size is provided to the reset driver separately from the CCU descriptor, which is a bit strange. Let's do this the usual way, with the array sizes next to the arrays themselves. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> [Andre: add F1C100s support] Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'include/clk')
-rw-r--r--include/clk/sunxi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clk/sunxi.h b/include/clk/sunxi.h
index c4a9dee5eb..f1717a5e95 100644
--- a/include/clk/sunxi.h
+++ b/include/clk/sunxi.h
@@ -70,6 +70,8 @@ struct ccu_reset {
struct ccu_desc {
const struct ccu_clk_gate *gates;
const struct ccu_reset *resets;
+ u8 num_gates;
+ u8 num_resets;
};
/**