diff mbox series

[v3,9/9] interconnect: qcom: rpm: Don't use clk_get_optional for bus clocks anymore

Message ID 20230116132152.405535-10-konrad.dybcio@linaro.org
State Superseded
Headers show
Series [v3,1/9] interconnect: qcom: rpm: make QoS INVALID default, separate out driver data | expand

Commit Message

Konrad Dybcio Jan. 16, 2023, 1:21 p.m. UTC
Commit dd42ec8ea5b9 ("interconnect: qcom: rpm: Use _optional func for provider clocks")
relaxed the requirements around probing bus clocks. This was a decent
solution for making sure MSM8996 would still boot with old DTs, but
now that there's a proper fix in place that both old and new DTs
will be happy about, revert back to the safer variant of the
function.

Fixes: dd42ec8ea5b9 ("interconnect: qcom: rpm: Use _optional func for provider clocks")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 drivers/interconnect/qcom/icc-rpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Arnaud Vrac Jan. 23, 2023, 6:41 p.m. UTC | #1
Hi Konrad,

With this series on a db820c, I get an error on boot when probing
a0noc because no "bus" clock is defined. If I revert this patch it
works again.

-Arnaud

Le lun. 16 janv. 2023 à 14:31, Konrad Dybcio
<konrad.dybcio@linaro.org> a écrit :
>
> Commit dd42ec8ea5b9 ("interconnect: qcom: rpm: Use _optional func for provider clocks")
> relaxed the requirements around probing bus clocks. This was a decent
> solution for making sure MSM8996 would still boot with old DTs, but
> now that there's a proper fix in place that both old and new DTs
> will be happy about, revert back to the safer variant of the
> function.
>
> Fixes: dd42ec8ea5b9 ("interconnect: qcom: rpm: Use _optional func for provider clocks")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  drivers/interconnect/qcom/icc-rpm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
> index 343e6021a93a..8cff724661f2 100644
> --- a/drivers/interconnect/qcom/icc-rpm.c
> +++ b/drivers/interconnect/qcom/icc-rpm.c
> @@ -522,7 +522,7 @@ int qnoc_probe(struct platform_device *pdev)
>         }
>
>  regmap_done:
> -       ret = devm_clk_bulk_get_optional(dev, qp->num_bus_clks, qp->bus_clks);
> +       ret = devm_clk_bulk_get(dev, qp->num_bus_clks, qp->bus_clks);
>         if (ret)
>                 return ret;
>
> --
> 2.39.0
>
Konrad Dybcio Jan. 23, 2023, 7:11 p.m. UTC | #2
On 23.01.2023 19:41, Arnaud Vrac wrote:
> Hi Konrad,
> 
> With this series on a db820c, I get an error on boot when probing
> a0noc because no "bus" clock is defined. If I revert this patch it
> works again.
> 
> -Arnaud
Ouch! Thanks for testing and catching this, definitely an edge
case, as we usually expect there's an interconnect bus and bus_a
clock.. but that can be worked around!

Konrad
> 
> Le lun. 16 janv. 2023 à 14:31, Konrad Dybcio
> <konrad.dybcio@linaro.org> a écrit :
>>
>> Commit dd42ec8ea5b9 ("interconnect: qcom: rpm: Use _optional func for provider clocks")
>> relaxed the requirements around probing bus clocks. This was a decent
>> solution for making sure MSM8996 would still boot with old DTs, but
>> now that there's a proper fix in place that both old and new DTs
>> will be happy about, revert back to the safer variant of the
>> function.
>>
>> Fixes: dd42ec8ea5b9 ("interconnect: qcom: rpm: Use _optional func for provider clocks")
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>>  drivers/interconnect/qcom/icc-rpm.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
>> index 343e6021a93a..8cff724661f2 100644
>> --- a/drivers/interconnect/qcom/icc-rpm.c
>> +++ b/drivers/interconnect/qcom/icc-rpm.c
>> @@ -522,7 +522,7 @@ int qnoc_probe(struct platform_device *pdev)
>>         }
>>
>>  regmap_done:
>> -       ret = devm_clk_bulk_get_optional(dev, qp->num_bus_clks, qp->bus_clks);
>> +       ret = devm_clk_bulk_get(dev, qp->num_bus_clks, qp->bus_clks);
>>         if (ret)
>>                 return ret;
>>
>> --
>> 2.39.0
>>
diff mbox series

Patch

diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
index 343e6021a93a..8cff724661f2 100644
--- a/drivers/interconnect/qcom/icc-rpm.c
+++ b/drivers/interconnect/qcom/icc-rpm.c
@@ -522,7 +522,7 @@  int qnoc_probe(struct platform_device *pdev)
 	}
 
 regmap_done:
-	ret = devm_clk_bulk_get_optional(dev, qp->num_bus_clks, qp->bus_clks);
+	ret = devm_clk_bulk_get(dev, qp->num_bus_clks, qp->bus_clks);
 	if (ret)
 		return ret;