Re: [PATCH v5 05/15] clk: qcom: gcc-ipq806x: convert parent_names to parent_data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Ansuel Smith (2022-02-24 08:48:21)
> Convert parent_names to parent_data to modernize the driver.
> Where possible use parent_hws directly.
> 
> Signed-off-by: Ansuel Smith <ansuelsmth@xxxxxxxxx>
> ---
>  drivers/clk/qcom/gcc-ipq806x.c | 293 ++++++++++++++++++++-------------
>  1 file changed, 180 insertions(+), 113 deletions(-)
> 
> diff --git a/drivers/clk/qcom/gcc-ipq806x.c b/drivers/clk/qcom/gcc-ipq806x.c
> index 34cddf461dba..f18888454b4f 100644
> --- a/drivers/clk/qcom/gcc-ipq806x.c
> +++ b/drivers/clk/qcom/gcc-ipq806x.c
> @@ -25,6 +25,11 @@
>  #include "clk-hfpll.h"
>  #include "reset.h"
>  
> +static const struct clk_parent_data gcc_pxo[] = {
> +       { .fw_name = "pxo" },
> +       { .name = "pxo" },

This is supposed to be one element, not two?

	{ .fw_name = "pxo", .name = "pxo" }

> +};
> +
>  static struct clk_pll pll0 = {
>         .l_reg = 0x30c4,
>         .m_reg = 0x30c8,
> @@ -259,9 +270,10 @@ static const struct parent_map gcc_pxo_pll8_map[] = {
>         { P_PLL8, 3 }
>  };
>  
> -static const char * const gcc_pxo_pll8[] = {
> -       "pxo",
> -       "pll8_vote",
> +static const struct clk_parent_data gcc_pxo_pll8[] = {
> +       { .fw_name = "pxo" },
> +       { .name = "pxo" },
> +       { .hw = &pll8_vote.hw },
>  };
>  
>  static const struct parent_map gcc_pxo_pll8_cxo_map[] = {
> @@ -270,10 +282,12 @@ static const struct parent_map gcc_pxo_pll8_cxo_map[] = {
>         { P_CXO, 5 }
>  };
>  
> -static const char * const gcc_pxo_pll8_cxo[] = {
> -       "pxo",
> -       "pll8_vote",
> -       "cxo",
> +static const struct clk_parent_data gcc_pxo_pll8_cxo[] = {
> +       { .fw_name = "pxo" },
> +       { .name = "pxo" },
> +       { .hw = &pll8_vote.hw },
> +       { .fw_name = "cxo" },
> +       { .name = "cxo" },
>  };
>  
>  static const struct parent_map gcc_pxo_pll3_map[] = {
> @@ -286,9 +300,10 @@ static const struct parent_map gcc_pxo_pll3_sata_map[] = {
>         { P_PLL3, 6 }
>  };
>  
> -static const char * const gcc_pxo_pll3[] = {
> -       "pxo",
> -       "pll3",
> +static const struct clk_parent_data gcc_pxo_pll3[] = {
> +       { .fw_name = "pxo" },
> +       { .name = "pxo" },
> +       { .hw = &pll3.clkr.hw },
>  };
>  
>  static const struct parent_map gcc_pxo_pll8_pll0_map[] = {
> @@ -297,10 +312,11 @@ static const struct parent_map gcc_pxo_pll8_pll0_map[] = {
>         { P_PLL0, 2 }
>  };
>  
> -static const char * const gcc_pxo_pll8_pll0[] = {
> -       "pxo",
> -       "pll8_vote",
> -       "pll0_vote",
> +static const struct clk_parent_data gcc_pxo_pll8_pll0[] = {
> +       { .fw_name = "pxo" },
> +       { .name = "pxo" },

Same comment for these ones

> +       { .hw = &pll8_vote.hw },
> +       { .hw = &pll0_vote.hw },
>  };




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux