[PATCH] clk: versal: Update the reference clocks as per bindings
Michal Simek
michal.simek at amd.com
Mon Feb 17 15:34:21 CET 2025
On 2/6/25 10:15, Venkatesh Yadav Abbarapu wrote:
> As per the bindings the reference clocks naming has changed
> from "pl_alt_ref_clk" to "pl_alt_ref" and "ref_clk" to "ref".
> Update the same in the clock driver. Also add the fallback option
> for older DT bindings.
>
> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu at amd.com>
> ---
> drivers/clk/clk_versal.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
> index 35ee56d0693..3e471670a87 100644
> --- a/drivers/clk/clk_versal.c
> +++ b/drivers/clk/clk_versal.c
> @@ -679,12 +679,21 @@ static int versal_clk_probe(struct udevice *dev)
>
> debug("%s\n", __func__);
>
> - ret = versal_clock_get_freq_by_name("pl_alt_ref_clk",
> + ret = versal_clock_get_freq_by_name("pl_alt_ref",
> dev, &pl_alt_ref_clk);
> + if (ret == -ENODATA) {
> + /* Fallback to old DT binding clk name "pl_alt_ref_clk" */
> + ret = versal_clock_get_freq_by_name("pl_alt_ref_clk",
> + dev, &pl_alt_ref_clk);
> + }
> if (ret < 0)
> return -EINVAL;
>
> - ret = versal_clock_get_freq_by_name("ref_clk", dev, &ref_clk);
> + ret = versal_clock_get_freq_by_name("ref", dev, &ref_clk);
> + if (ret == -ENODATA) {
> + /* Fallback to old DT binding clk name "ref_clk" */
> + ret = versal_clock_get_freq_by_name("ref_clk", dev, &ref_clk);
> + }
> if (ret < 0)
> return -EINVAL;
>
Applied.
M
More information about the U-Boot
mailing list