Skip to content

Commit 05d3b7c

Browse files
superna9999jbrun3t
authored andcommitted
clk: meson: migrate axg-audio 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-6-38172d17c27a@linaro.org Signed-off-by: Jerome Brunet <[email protected]>
1 parent 5e4e480 commit 05d3b7c

File tree

3 files changed

+424
-428
lines changed

3 files changed

+424
-428
lines changed

drivers/clk/meson/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ config COMMON_CLK_AXG_AUDIO
100100
select COMMON_CLK_MESON_REGMAP
101101
select COMMON_CLK_MESON_PHASE
102102
select COMMON_CLK_MESON_SCLK_DIV
103+
select COMMON_CLK_MESON_CLKC_UTILS
103104
select REGMAP_MMIO
104105
help
105106
Support for the audio clock controller on AmLogic A113D devices,

0 commit comments

Comments
 (0)