diff options
author | Sebastian Reichel <sebastian.reichel@collabora.com> | 2022-10-18 17:14:05 +0200 |
---|---|---|
committer | Heiko Stuebner <heiko@sntech.de> | 2022-11-14 15:35:07 +0100 |
commit | ff94c8660dac444081f2f650fae36a283c55b117 (patch) | |
tree | 1a66a57f9ac73520ad7d2560e981f417014d2bc4 /drivers/clk/rockchip/clk.h | |
parent | clk: rockchip: allow additional mux options for cpu-clock frequency changes (diff) | |
download | linux-ff94c8660dac444081f2f650fae36a283c55b117.tar.xz linux-ff94c8660dac444081f2f650fae36a283c55b117.zip |
clk: rockchip: simplify rockchip_clk_add_lookup
rockchip_clk_add_lookup is only called from within the file,
so it can be made static. The additional checks are removed
with the following reasoning:
1. The data structure is initialized by rockchip_clk_init(),
which is called by all rockchip platforms before the clocks
are registered. Not doing so would result in an incomplete
clock tree at the moment, which is a fatal error. In other
parts of the kernel these kind of checks are usually
omitted, so this was done here. The alternative is adding
a pr_err to inform the kernel programmer adding a new platform
about his incorrect code. Apart from that we are also not
checking if the clock id is within the array boundings.
2. While not used so far by any rockchip platform, 0 is a valid
clock identifier. To align rockchip closer to other ARM
platforms we will start using it with rk3588.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20221018151407.63395-8-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'drivers/clk/rockchip/clk.h')
-rw-r--r-- | drivers/clk/rockchip/clk.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h index 24d3e56d3f71..6e84ab85b372 100644 --- a/drivers/clk/rockchip/clk.h +++ b/drivers/clk/rockchip/clk.h @@ -928,8 +928,6 @@ struct rockchip_clk_provider *rockchip_clk_init(struct device_node *np, void __iomem *base, unsigned long nr_clks); void rockchip_clk_of_add_provider(struct device_node *np, struct rockchip_clk_provider *ctx); -void rockchip_clk_add_lookup(struct rockchip_clk_provider *ctx, - struct clk *clk, unsigned int id); void rockchip_clk_register_branches(struct rockchip_clk_provider *ctx, struct rockchip_clk_branch *list, unsigned int nr_clk); |