[PATCH 22/26] clk: amlogic: introduce a common pclk definition
Chuan Liu
chuan.liu at amlogic.com
Thu Jul 3 00:10:27 PDT 2025
Hi Jerome:
On 7/2/2025 11:26 PM, Jerome Brunet wrote:
> [ EXTERNAL EMAIL ]
>
> All Amlogic peripheral clocks are more or less the same. The only thing
> that differs is the parent data.
>
> Adapt the common pclk definition so it takes clk_parent_data and can be
> used by all controllers.
>
> Signed-off-by: Jerome Brunet <jbrunet at baylibre.com>
> ---
> drivers/clk/meson/a1-peripherals.c | 4 +++-
> drivers/clk/meson/axg.c | 4 +++-
> drivers/clk/meson/g12a.c | 6 ++++--
> drivers/clk/meson/gxbb.c | 26 +++++++++++++++++---------
> drivers/clk/meson/meson-clkc-utils.h | 12 ++++++------
> drivers/clk/meson/meson8b.c | 31 ++++++++++++++++++-------------
> drivers/clk/meson/s4-peripherals.c | 4 +++-
> 7 files changed, 54 insertions(+), 33 deletions(-)
for 'drivers/clk/meson/s4-peripherals.c'.
Reviewed-by: Chuan Liu <chuan.liu at amlogic.com>
> diff --git a/drivers/clk/meson/s4-peripherals.c b/drivers/clk/meson/s4-peripherals.c
> index 23b51d84d8de40aa540dbc6dd5db9fb627e579de..3e048e645b080f9e5982ef908e3f9c43578a0b5f 100644
> --- a/drivers/clk/meson/s4-peripherals.c
> +++ b/drivers/clk/meson/s4-peripherals.c
> @@ -3165,8 +3165,10 @@ static struct clk_regmap s4_gen_clk = {
> },
> };
>
> +static const struct clk_parent_data s4_pclk_parents = { .hw = &s4_sys_clk.hw };
> +
> #define S4_PCLK(_name, _reg, _bit, _flags) \
> - MESON_PCLK(_name, _reg, _bit, &s4_sys_clk.hw, _flags)
> + MESON_PCLK(_name, _reg, _bit, &s4_pclk_parents, _flags)
>
> /*
> * NOTE: The gates below are marked with CLK_IGNORE_UNUSED for historic reasons
>
> --
> 2.47.2
>
>
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic
More information about the linux-amlogic
mailing list