Re: [PATCH RFC RFT v3 06/13] clk: meson: c3: Model the PLL pre-divider as a divider clock
From: Jerome Brunet
Date: Thu Dec 03 2026 - 10:31:31 EST
> The pre-divider is currently described by a dedicated n parameter,
> although it is a plain divider between the input clock and the DCO.
>
> Model it as a regular divider clock and make it the parent of the DCO.
>
> Signed-off-by: Jian Hu <jian.hu@xxxxxxxxxxx>
> ---
> drivers/clk/meson/c3-pll.c | 97 ++++++++++++++++++++++++++++++++++++----------
> 1 file changed, 76 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/clk/meson/c3-pll.c b/drivers/clk/meson/c3-pll.c
> index dd047d17488c..984f43f1c76c 100644
> --- a/drivers/clk/meson/c3-pll.c
> +++ b/drivers/clk/meson/c3-pll.c
> @@ -230,6 +230,34 @@ static struct clk_regmap c3_fclk_div7 = {
> },
> };
>
> +/* Force the pre-divider at 1 to minimize PLL jitter */
> +static const struct clk_div_table c3_pll_prediv_div_table[] = {
> + { .val = 1, .div = 1 },
> + { /* sentinel */ }
> +};
> +
> +static struct clk_regmap c3_gp0_prediv = {
> + .data = &(struct clk_regmap_div_data) {
> + .offset = ANACTRL_GP0PLL_CTRL0,
> + .shift = 10,
> + .width = 5,
> + .table = c3_pll_prediv_div_table,
> + /*
> + * CLK_DIVIDER_INVALID_ZERO to report 0 Hz during registration.
> + * The same applies below.
> + */
Paraphrasing the flag doc. useless
Reviewed-by: Jerome Brunet <jbrunet@xxxxxxxxxxxx>
--
Jerome