Re: [PATCH 2/5] clk: qcom: gcc: Add support for Global Clock controller found on MSM8226

From: Stephen Boyd
Date: Fri Mar 26 2021 - 14:24:37 EST


Quoting Bartosz Dudziak (2021-03-26 07:58:13)
> Modify existing MSM8974 driver to support MSM8226 SoC. Override frequencies
> which are different in this older chip. Register all the clocks to the
> framework for the clients to be able to request for them.

Alphabet sort includes? Preferably do that in a different patch.

>
> Signed-off-by: Bartosz Dudziak <bartosz.dudziak@xxxxxxxx>
> ---
> drivers/clk/qcom/gcc-msm8974.c | 185 ++++++++++++++++++++++++++++++---
> 1 file changed, 171 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/clk/qcom/gcc-msm8974.c b/drivers/clk/qcom/gcc-msm8974.c
> index 740d3c44c0..06cd669e10 100644
> --- a/drivers/clk/qcom/gcc-msm8974.c
> +++ b/drivers/clk/qcom/gcc-msm8974.c
> @@ -3,16 +3,13 @@
> * Copyright (c) 2013, The Linux Foundation. All rights reserved.
> */
>
> -#include <linux/kernel.h>
> -#include <linux/bitops.h>
> +#include <linux/clk-provider.h>
> #include <linux/err.h>
> -#include <linux/platform_device.h>
> +#include <linux/kernel.h>
> #include <linux/module.h>
> -#include <linux/of.h>
> #include <linux/of_device.h>
> -#include <linux/clk-provider.h>
> +#include <linux/of.h>
> #include <linux/regmap.h>
> -#include <linux/reset-controller.h>
>
> #include <dt-bindings/clock/qcom,gcc-msm8974.h>
> #include <dt-bindings/reset/qcom,gcc-msm8974.h>
> @@ -2727,7 +2880,11 @@ static int gcc_msm8974_probe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> - return qcom_cc_probe(pdev, &gcc_msm8974_desc);
> + regmap = qcom_cc_map(pdev, id->data);
> + if (IS_ERR(regmap))
> + return PTR_ERR(regmap);
> +
> + return qcom_cc_really_probe(pdev, id->data, regmap);

Is this doing anything? I think qcom_cc_probe(pdev, id->data) should
work?