[PATCH v4 0/3] clk: amlogic: drop clk_regmap tables
From: Jerome Brunet <jbrunet@baylibre.com>
Date: 2025-06-23 16:37:47
Also in:
linux-amlogic, linux-clk, lkml
This patchset removes the need for clk_regmap tables in each clock controller driver. These were used to populate regmap with in the regmap based clocks. This saves memory and is the 2nd step in a series of rework of Amlogic clocks, to clean-up, increase code re-use and ease future maintenance. Note: the clock initilization callback has guess what in order to properly get the necessary regmap. This is not ideal and temporary as noted in the code comments. This intent is to eventualy replace this with a dedicated location where regmap may be consistently retreived by the clock. Changes in v4: - Rebased clk-meson-next targeting v6.17 - Link to v3: https://lore.kernel.org/r/20250120-amlogic-clk-drop-clk-regmap-tables-v3-0-126244146947@baylibre.com (local) Changes in v3: - Fix some typos - Link to v2: https://lore.kernel.org/r/20250117-amlogic-clk-drop-clk-regmap-tables-v2-0-d1f77cb0773e@baylibre.com (local) Changes in v2: - Add clk_hw_get_of_node and kunit tests for the new helpers - Split patch adding the .init() and the dropping the table - Drop devres based solution and something temporary but simple while a more generic solution to hook controller init is discussed. - Link to v1: https://lore.kernel.org/r/20241220-amlogic-clk-drop-clk-regmap-tables-v1-0-96dd657cbfbd@baylibre.com (local) Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> --- Jerome Brunet (3): clk: amlogic: get regmap with clk_regmap_init clk: amlogic: drop clk_regmap tables clk: amlogic: s4: remove unused data drivers/clk/meson/Kconfig | 1 + drivers/clk/meson/a1-peripherals.c | 163 +------------- drivers/clk/meson/a1-pll.c | 16 +- drivers/clk/meson/axg-aoclk.c | 22 -- drivers/clk/meson/axg-audio.c | 433 ------------------------------------- drivers/clk/meson/axg.c | 131 ----------- drivers/clk/meson/c3-peripherals.c | 210 +----------------- drivers/clk/meson/c3-pll.c | 32 +-- drivers/clk/meson/clk-cpu-dyndiv.c | 1 + drivers/clk/meson/clk-dualdiv.c | 2 + drivers/clk/meson/clk-mpll.c | 6 + drivers/clk/meson/clk-phase.c | 11 + drivers/clk/meson/clk-pll.c | 7 + drivers/clk/meson/clk-regmap.c | 49 +++++ drivers/clk/meson/clk-regmap.h | 4 + drivers/clk/meson/g12a-aoclk.c | 34 --- drivers/clk/meson/g12a.c | 261 ---------------------- drivers/clk/meson/gxbb-aoclk.c | 19 -- drivers/clk/meson/gxbb.c | 393 --------------------------------- drivers/clk/meson/meson-aoclk.c | 5 +- drivers/clk/meson/meson-aoclk.h | 2 - drivers/clk/meson/meson-eeclk.c | 4 - drivers/clk/meson/meson-eeclk.h | 2 - drivers/clk/meson/meson8-ddr.c | 9 - drivers/clk/meson/meson8b.c | 200 ----------------- drivers/clk/meson/s4-peripherals.c | 341 ----------------------------- drivers/clk/meson/s4-pll.c | 31 --- drivers/clk/meson/sclk-div.c | 5 + drivers/clk/meson/vclk.c | 2 + drivers/clk/meson/vid-pll-div.c | 1 + 30 files changed, 94 insertions(+), 2303 deletions(-) --- base-commit: b7f68cdf9f2a42b88815941538446dbf4f2dd464 change-id: 20241220-amlogic-clk-drop-clk-regmap-tables-18e5cf572356 Best regards, -- Jerome