Add support to register the rcg dfs in qcom_cc_really_probe(). This
allows users to move the call from the probe function to static
properties.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/clk/qcom/common.c | 8 ++++++++
drivers/clk/qcom/common.h | 2 ++
2 files changed, 10 insertions(+)
diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
index b3838d885db25f183979576e5c685c07dc6a7049..d53f290c6121f31d06cf244f72603b694966e216 100644
--- a/drivers/clk/qcom/common.c
+++ b/drivers/clk/qcom/common.c
@@ -390,6 +390,14 @@ int qcom_cc_really_probe(struct device *dev,
goto put_rpm;
}
+ if (desc->dfs_rcgs && desc->num_dfs_rcgs) {
+ ret = qcom_cc_register_rcg_dfs(regmap,
+ desc->dfs_rcgs,
+ desc->num_dfs_rcgs);
+ if (ret)
+ goto put_rpm;
+ }
+
cc->rclks = rclks;
cc->num_rclks = num_clks;
diff --git a/drivers/clk/qcom/common.h b/drivers/clk/qcom/common.h
index 0f4b2d40c65cf94de694226f63ca30f4181d0ce5..dbe7ebe5b8710fb03c1671ac9022e608a6aad35f 100644
--- a/drivers/clk/qcom/common.h
+++ b/drivers/clk/qcom/common.h
@@ -43,6 +43,8 @@ struct qcom_cc_desc {
size_t num_gdscs;
struct clk_hw **clk_hws;
size_t num_clk_hws;
+ const struct clk_rcg_dfs_data *dfs_rcgs;
+ size_t num_dfs_rcgs;
const struct qcom_icc_hws_data *icc_hws;
size_t num_icc_hws;
unsigned int icc_first_node_id;
--
2.50.0
On 7/4/2025 12:46 PM, Luca Weiss wrote:
> Add support to register the rcg dfs in qcom_cc_really_probe(). This
> allows users to move the call from the probe function to static
> properties.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> drivers/clk/qcom/common.c | 8 ++++++++
> drivers/clk/qcom/common.h | 2 ++
> 2 files changed, 10 insertions(+)
>
> diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
> index b3838d885db25f183979576e5c685c07dc6a7049..d53f290c6121f31d06cf244f72603b694966e216 100644
> --- a/drivers/clk/qcom/common.c
> +++ b/drivers/clk/qcom/common.c
> @@ -390,6 +390,14 @@ int qcom_cc_really_probe(struct device *dev,
> goto put_rpm;
> }
>
> + if (desc->dfs_rcgs && desc->num_dfs_rcgs) {
> + ret = qcom_cc_register_rcg_dfs(regmap,
> + desc->dfs_rcgs,
> + desc->num_dfs_rcgs);
> + if (ret)
> + goto put_rpm;
> + }
> +
> cc->rclks = rclks;
> cc->num_rclks = num_clks;
>
> diff --git a/drivers/clk/qcom/common.h b/drivers/clk/qcom/common.h
> index 0f4b2d40c65cf94de694226f63ca30f4181d0ce5..dbe7ebe5b8710fb03c1671ac9022e608a6aad35f 100644
> --- a/drivers/clk/qcom/common.h
> +++ b/drivers/clk/qcom/common.h
> @@ -43,6 +43,8 @@ struct qcom_cc_desc {
> size_t num_gdscs;
> struct clk_hw **clk_hws;
> size_t num_clk_hws;
> + const struct clk_rcg_dfs_data *dfs_rcgs;
> + size_t num_dfs_rcgs;
Since all other probe configurations are added in qcom_cc_driver_data struct, it is better to
add rcg dfs data also to qcom_cc_driver_data struct instead of qcom_cc_desc.
Thanks,
Jagadeesh
> const struct qcom_icc_hws_data *icc_hws;
> size_t num_icc_hws;
> unsigned int icc_first_node_id;
>
Hi Jagadeesh,
On Tue Jul 8, 2025 at 7:34 AM CEST, Jagadeesh Kona wrote:
>
>
> On 7/4/2025 12:46 PM, Luca Weiss wrote:
>> Add support to register the rcg dfs in qcom_cc_really_probe(). This
>> allows users to move the call from the probe function to static
>> properties.
>>
>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
>> ---
>> drivers/clk/qcom/common.c | 8 ++++++++
>> drivers/clk/qcom/common.h | 2 ++
>> 2 files changed, 10 insertions(+)
>>
>> diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
>> index b3838d885db25f183979576e5c685c07dc6a7049..d53f290c6121f31d06cf244f72603b694966e216 100644
>> --- a/drivers/clk/qcom/common.c
>> +++ b/drivers/clk/qcom/common.c
>> @@ -390,6 +390,14 @@ int qcom_cc_really_probe(struct device *dev,
>> goto put_rpm;
>> }
>>
>> + if (desc->dfs_rcgs && desc->num_dfs_rcgs) {
>> + ret = qcom_cc_register_rcg_dfs(regmap,
>> + desc->dfs_rcgs,
>> + desc->num_dfs_rcgs);
>> + if (ret)
>> + goto put_rpm;
>> + }
>> +
>> cc->rclks = rclks;
>> cc->num_rclks = num_clks;
>>
>> diff --git a/drivers/clk/qcom/common.h b/drivers/clk/qcom/common.h
>> index 0f4b2d40c65cf94de694226f63ca30f4181d0ce5..dbe7ebe5b8710fb03c1671ac9022e608a6aad35f 100644
>> --- a/drivers/clk/qcom/common.h
>> +++ b/drivers/clk/qcom/common.h
>> @@ -43,6 +43,8 @@ struct qcom_cc_desc {
>> size_t num_gdscs;
>> struct clk_hw **clk_hws;
>> size_t num_clk_hws;
>> + const struct clk_rcg_dfs_data *dfs_rcgs;
>> + size_t num_dfs_rcgs;
>
> Since all other probe configurations are added in qcom_cc_driver_data struct, it is better to
> add rcg dfs data also to qcom_cc_driver_data struct instead of qcom_cc_desc.
Dmitry suggested to use struct qcom_cc_desc:
https://lore.kernel.org/linux-arm-msm/w4eujq72uqflqpsqshc7zhu6lkc7owufep2g2rjacvzgj44vmf@auonp4ugbgow/
I personally don't have a preference.
Regards
Luca
>
> Thanks,
> Jagadeesh
>
>> const struct qcom_icc_hws_data *icc_hws;
>> size_t num_icc_hws;
>> unsigned int icc_first_node_id;
>>
On 7/9/2025 5:18 PM, Luca Weiss wrote:
> Hi Jagadeesh,
>
> On Tue Jul 8, 2025 at 7:34 AM CEST, Jagadeesh Kona wrote:
>>
>>
>> On 7/4/2025 12:46 PM, Luca Weiss wrote:
>>> Add support to register the rcg dfs in qcom_cc_really_probe(). This
>>> allows users to move the call from the probe function to static
>>> properties.
>>>
>>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
>>> ---
>>> drivers/clk/qcom/common.c | 8 ++++++++
>>> drivers/clk/qcom/common.h | 2 ++
>>> 2 files changed, 10 insertions(+)
>>>
>>> diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
>>> index b3838d885db25f183979576e5c685c07dc6a7049..d53f290c6121f31d06cf244f72603b694966e216 100644
>>> --- a/drivers/clk/qcom/common.c
>>> +++ b/drivers/clk/qcom/common.c
>>> @@ -390,6 +390,14 @@ int qcom_cc_really_probe(struct device *dev,
>>> goto put_rpm;
>>> }
>>>
>>> + if (desc->dfs_rcgs && desc->num_dfs_rcgs) {
>>> + ret = qcom_cc_register_rcg_dfs(regmap,
>>> + desc->dfs_rcgs,
>>> + desc->num_dfs_rcgs);
>>> + if (ret)
>>> + goto put_rpm;
>>> + }
>>> +
>>> cc->rclks = rclks;
>>> cc->num_rclks = num_clks;
>>>
>>> diff --git a/drivers/clk/qcom/common.h b/drivers/clk/qcom/common.h
>>> index 0f4b2d40c65cf94de694226f63ca30f4181d0ce5..dbe7ebe5b8710fb03c1671ac9022e608a6aad35f 100644
>>> --- a/drivers/clk/qcom/common.h
>>> +++ b/drivers/clk/qcom/common.h
>>> @@ -43,6 +43,8 @@ struct qcom_cc_desc {
>>> size_t num_gdscs;
>>> struct clk_hw **clk_hws;
>>> size_t num_clk_hws;
>>> + const struct clk_rcg_dfs_data *dfs_rcgs;
>>> + size_t num_dfs_rcgs;
>>
>> Since all other probe configurations are added in qcom_cc_driver_data struct, it is better to
>> add rcg dfs data also to qcom_cc_driver_data struct instead of qcom_cc_desc.
>
> Dmitry suggested to use struct qcom_cc_desc:
> https://lore.kernel.org/linux-arm-msm/w4eujq72uqflqpsqshc7zhu6lkc7owufep2g2rjacvzgj44vmf@auonp4ugbgow/
>
> I personally don't have a preference.
>
Hi Luca,
As other probe configurations like critical clock cbcrs & pll configurations are part of driver_data, it is better
to include this DFS data also in driver_data.
Dmitry, I hope it is fine to move the above DFS data to qcom_cc_driver_data struct instead of qcom_cc_desc.
Thanks,
Jagadeesh
> Regards
> Luca
>
>>
>> Thanks,
>> Jagadeesh
>>
>>> const struct qcom_icc_hws_data *icc_hws;
>>> size_t num_icc_hws;
>>> unsigned int icc_first_node_id;
>>>
>
On Mon, Jul 14, 2025 at 04:34:39PM +0530, Jagadeesh Kona wrote:
>
>
> On 7/9/2025 5:18 PM, Luca Weiss wrote:
> > Hi Jagadeesh,
> >
> > On Tue Jul 8, 2025 at 7:34 AM CEST, Jagadeesh Kona wrote:
> >>
> >>
> >> On 7/4/2025 12:46 PM, Luca Weiss wrote:
> >>> Add support to register the rcg dfs in qcom_cc_really_probe(). This
> >>> allows users to move the call from the probe function to static
> >>> properties.
> >>>
> >>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> >>> ---
> >>> drivers/clk/qcom/common.c | 8 ++++++++
> >>> drivers/clk/qcom/common.h | 2 ++
> >>> 2 files changed, 10 insertions(+)
> >>> diff --git a/drivers/clk/qcom/common.h b/drivers/clk/qcom/common.h
> >>> index 0f4b2d40c65cf94de694226f63ca30f4181d0ce5..dbe7ebe5b8710fb03c1671ac9022e608a6aad35f 100644
> >>> --- a/drivers/clk/qcom/common.h
> >>> +++ b/drivers/clk/qcom/common.h
> >>> @@ -43,6 +43,8 @@ struct qcom_cc_desc {
> >>> size_t num_gdscs;
> >>> struct clk_hw **clk_hws;
> >>> size_t num_clk_hws;
> >>> + const struct clk_rcg_dfs_data *dfs_rcgs;
> >>> + size_t num_dfs_rcgs;
> >>
> >> Since all other probe configurations are added in qcom_cc_driver_data struct, it is better to
> >> add rcg dfs data also to qcom_cc_driver_data struct instead of qcom_cc_desc.
> >
> > Dmitry suggested to use struct qcom_cc_desc:
> > https://lore.kernel.org/linux-arm-msm/w4eujq72uqflqpsqshc7zhu6lkc7owufep2g2rjacvzgj44vmf@auonp4ugbgow/
> >
> > I personally don't have a preference.
> >
>
> Hi Luca,
>
> As other probe configurations like critical clock cbcrs & pll configurations are part of driver_data, it is better
> to include this DFS data also in driver_data.
>
> Dmitry, I hope it is fine to move the above DFS data to qcom_cc_driver_data struct instead of qcom_cc_desc.
Yes, of course.
--
With best wishes
Dmitry
On 04-Jul-25 09:16, Luca Weiss wrote: > Add support to register the rcg dfs in qcom_cc_really_probe(). This > allows users to move the call from the probe function to static > properties. > > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Konrad
© 2016 - 2026 Red Hat, Inc.