summaryrefslogtreecommitdiffstats
path: root/drivers/clk/meson/a1-pll.h
diff options
context:
space:
mode:
authorNeil Armstrong <neil.armstrong@linaro.org>2023-06-12 11:57:21 +0200
committerJerome Brunet <jbrunet@baylibre.com>2023-08-08 16:06:16 +0200
commitc3f2801b81e9511a42fbec54567f7b5e47fd9580 (patch)
treed23e8ee2030249b5d4297f70ed456555aa596f39 /drivers/clk/meson/a1-pll.h
parentclk: meson: migrate meson-aoclk out of hw_onecell_data to drop NR_CLKS (diff)
downloadlinux-c3f2801b81e9511a42fbec54567f7b5e47fd9580.tar.xz
linux-c3f2801b81e9511a42fbec54567f7b5e47fd9580.zip
clk: meson: migrate a1 clock drivers out of hw_onecell_data to drop NR_CLKS
The way hw_onecell_data is declared: struct clk_hw_onecell_data { unsigned int num; struct clk_hw *hws[]; }; makes it impossible to have the clk_hw table declared outside while using ARRAY_SIZE() to determine ".num" due to ".hws" being a flexible array member. Completely move out of hw_onecell_data and add a custom devm_of_clk_add_hw_provider() "get" callback to retrieve the clk_hw in order to finally get rid on the NR_CLKS define. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Dmitry Rokosov <ddrokosov@sberdevices.ru> Link: https://lore.kernel.org/r/20230607-topic-amlogic-upstream-clkid-public-migration-v2-4-38172d17c27a@linaro.org Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Diffstat (limited to 'drivers/clk/meson/a1-pll.h')
-rw-r--r--drivers/clk/meson/a1-pll.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/clk/meson/a1-pll.h b/drivers/clk/meson/a1-pll.h
index 29726651b056..82570759e6a2 100644
--- a/drivers/clk/meson/a1-pll.h
+++ b/drivers/clk/meson/a1-pll.h
@@ -42,6 +42,5 @@
#define CLKID_FCLK_DIV3_DIV 3
#define CLKID_FCLK_DIV5_DIV 4
#define CLKID_FCLK_DIV7_DIV 5
-#define NR_PLL_CLKS 11
#endif /* __A1_PLL_H */