Skip to content

Commit 5e4e480

Browse files
superna9999jbrun3t
authored andcommitted
clk: meson: migrate meson8b 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 <[email protected]> Link: https://lore.kernel.org/r/20230607-topic-amlogic-upstream-clkid-public-migration-v2-5-38172d17c27a@linaro.org Signed-off-by: Jerome Brunet <[email protected]>
1 parent c3f2801 commit 5e4e480

File tree

3 files changed

+660
-658
lines changed

3 files changed

+660
-658
lines changed

drivers/clk/meson/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ config COMMON_CLK_MESON8B
5353
depends on ARM
5454
default y
5555
select COMMON_CLK_MESON_REGMAP
56+
select COMMON_CLK_MESON_CLKC_UTILS
5657
select COMMON_CLK_MESON_MPLL
5758
select COMMON_CLK_MESON_PLL
5859
select MFD_SYSCON

0 commit comments

Comments
 (0)