[PATCH] clk: versaclock: Remove xlate function

Adam Ford aford173 at gmail.com
Mon Dec 6 14:40:42 CET 2021


On Wed, Dec 1, 2021 at 2:13 PM Sean Anderson <seanga2 at gmail.com> wrote:
>
> This function is the same as the default xlate. Remove it.
>

I compared 'clk dump' before and after this patch, and they both
appear to show the same clock tree and rates for the versaclock and
the USB scan appears to identify the attached USB thumb drive for me.

Reviewed-by: Adam Ford <aford173 at gmail.com>

> Signed-off-by: Sean Anderson <seanga2 at gmail.com>
> ---
>
>  drivers/clk/clk_versaclock.c | 19 -------------------
>  1 file changed, 19 deletions(-)
>
> diff --git a/drivers/clk/clk_versaclock.c b/drivers/clk/clk_versaclock.c
> index 578668bcf8..26c014cc4f 100644
> --- a/drivers/clk/clk_versaclock.c
> +++ b/drivers/clk/clk_versaclock.c
> @@ -618,24 +618,6 @@ static int vc5_clk_out_set_parent(struct vc5_driver_data *vc, u8 num, u8 index)
>         return vc5_update_bits(vc->i2c, VC5_OUT_DIV_CONTROL(num), mask, src);
>  }
>
> -/*
> - * The device references to the Versaclock point to the head, so xlate needs to
> - * redirect it to clk_out[idx]
> - */
> -static int vc5_clk_out_xlate(struct clk *hw, struct ofnode_phandle_args *args)
> -{
> -       unsigned int idx = args->args[0];
> -
> -       if (args->args_count != 1) {
> -               debug("Invaild args_count: %d\n", args->args_count);
> -               return -EINVAL;
> -       }
> -
> -       hw->id = idx;
> -
> -       return 0;
> -}
> -
>  static unsigned long vc5_clk_out_set_rate(struct clk *hw, unsigned long rate)
>  {
>         struct udevice *dev;
> @@ -671,7 +653,6 @@ static const struct clk_ops vc5_clk_out_sel_ops = {
>  static const struct clk_ops vc5_clk_ops = {
>         .enable = vc5_clk_out_prepare,
>         .disable        = vc5_clk_out_unprepare,
> -       .of_xlate       = vc5_clk_out_xlate,
>         .set_rate       = vc5_clk_out_set_rate,
>         .get_rate       = vc5_clk_out_get_rate,
>  };
> --
> 2.33.0
>


More information about the U-Boot mailing list