diff mbox series

[v6,4/6] clk: qcom: lpasscorecc-sc7280: Skip lpasscorecc registration

Message ID 1674728065-24955-5-git-send-email-quic_srivasam@quicinc.com
State New
Headers show
Series Add resets for ADSP based audio clock controller driver | expand

Commit Message

Srinivasa Rao Mandadapu Jan. 26, 2023, 10:14 a.m. UTC
Skip lpasscorecc clocks registration for ADSP based platforms
as it's causing NOC errors when ADSP based clocks are enabled.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Tested-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
---
 drivers/clk/qcom/lpasscorecc-sc7280.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Stephen Boyd Jan. 31, 2023, 12:54 a.m. UTC | #1
Quoting Srinivasa Rao Mandadapu (2023-01-26 02:14:23)
> Skip lpasscorecc clocks registration for ADSP based platforms
> as it's causing NOC errors when ADSP based clocks are enabled.
>
> Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
> Tested-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
> ---
>  drivers/clk/qcom/lpasscorecc-sc7280.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/clk/qcom/lpasscorecc-sc7280.c b/drivers/clk/qcom/lpasscorecc-sc7280.c
> index 6ad19b0..3aa16d8 100644
> --- a/drivers/clk/qcom/lpasscorecc-sc7280.c
> +++ b/drivers/clk/qcom/lpasscorecc-sc7280.c
> @@ -395,6 +395,9 @@ static int lpass_core_cc_sc7280_probe(struct platform_device *pdev)
>         const struct qcom_cc_desc *desc;
>         struct regmap *regmap;
>
> +       if (of_property_read_bool(pdev->dev.of_node, "qcom,adsp-pil-mode"))

Why is this node enabled in DT at all if it doesn't provide any clks?
Srinivasa Rao Mandadapu Jan. 31, 2023, 6:35 a.m. UTC | #2
On 1/31/2023 6:24 AM, Stephen Boyd wrote:
Thanks for your time Stephen!!!
> Quoting Srinivasa Rao Mandadapu (2023-01-26 02:14:23)
>> Skip lpasscorecc clocks registration for ADSP based platforms
>> as it's causing NOC errors when ADSP based clocks are enabled.
>>
>> Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
>> Tested-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
>> ---
>>   drivers/clk/qcom/lpasscorecc-sc7280.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/clk/qcom/lpasscorecc-sc7280.c b/drivers/clk/qcom/lpasscorecc-sc7280.c
>> index 6ad19b0..3aa16d8 100644
>> --- a/drivers/clk/qcom/lpasscorecc-sc7280.c
>> +++ b/drivers/clk/qcom/lpasscorecc-sc7280.c
>> @@ -395,6 +395,9 @@ static int lpass_core_cc_sc7280_probe(struct platform_device *pdev)
>>          const struct qcom_cc_desc *desc;
>>          struct regmap *regmap;
>>
>> +       if (of_property_read_bool(pdev->dev.of_node, "qcom,adsp-pil-mode"))
> Why is this node enabled in DT at all if it doesn't provide any clks?

Yes. Agree that we can disable this node in board specific DTS file. As 
I thought, disabling node is not appropriate,

preferred this way.
Anyway, as suggested, will drop this patch and disable node in DT.
diff mbox series

Patch

diff --git a/drivers/clk/qcom/lpasscorecc-sc7280.c b/drivers/clk/qcom/lpasscorecc-sc7280.c
index 6ad19b0..3aa16d8 100644
--- a/drivers/clk/qcom/lpasscorecc-sc7280.c
+++ b/drivers/clk/qcom/lpasscorecc-sc7280.c
@@ -395,6 +395,9 @@  static int lpass_core_cc_sc7280_probe(struct platform_device *pdev)
 	const struct qcom_cc_desc *desc;
 	struct regmap *regmap;
 
+	if (of_property_read_bool(pdev->dev.of_node, "qcom,adsp-pil-mode"))
+		return 0;
+
 	lpass_core_cc_sc7280_regmap_config.name = "lpass_core_cc";
 	lpass_core_cc_sc7280_regmap_config.max_register = 0x4f004;
 	desc = &lpass_core_cc_sc7280_desc;