Re: [PATCH 4/5] clk: x86: Support RV architecture

From: Stephen Boyd
Date: Wed Jul 15 2020 - 21:03:19 EST


Quoting Akshu Agrawal (2020-07-12 17:59:52)
> There is minor difference between previous family of SoC and
> the current one. Which is the there is only 48Mh fixed clk.
> There is no mux and no option to select another freq as there in previous.
>
> Signed-off-by: Akshu Agrawal <akshu.agrawal@xxxxxxx>
> ---

I only see four out of five patches and there isn't a cover letter. I
have no idea if I can apply this change or if you're expecting me to ack
it. Please help make my life a little easier!

> drivers/clk/x86/clk-fch.c | 55 ++++++++++++++++++++++++++++-----------
> 1 file changed, 40 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/clk/x86/clk-fch.c b/drivers/clk/x86/clk-fch.c
> index b252f0cf0628..a8aac71a3b65 100644
> --- a/drivers/clk/x86/clk-fch.c
> +++ b/drivers/clk/x86/clk-fch.c
> @@ -61,9 +78,17 @@ static int fch_clk_probe(struct platform_device *pdev)
> static int fch_clk_remove(struct platform_device *pdev)
> {
> int i;
> + struct fch_clk_data *fch_data;
> +
> + fch_data = dev_get_platdata(&pdev->dev);
>
> - for (i = 0; i < ST_MAX_CLKS; i++)
> - clk_hw_unregister(hws[i]);
> + if (!fch_data->is_rv) {
> + for (i = 0; i < ST_MAX_CLKS; i++)
> + clk_hw_unregister(hws[i]);
> + } else {
> + for (i = 0; i < RV_MAX_CLKS; i++)
> + clk_hw_unregister(hws[i]);

Can ST_MAX_CLKS or RV_MAX_CLKS be a local variable and then the loop
consolidated.