Skip to contentSkip to conversation

clk: qcom: common: Detach the power domain at the end of probe

RFC In review Abel Vesa 3 participants 4 messages Aug 4, 2022 – Sep 26, 2022

Subsystems (3)
lore
Share & tools
lore

Abel Vesa

author
#0 lore raw

RFC 1/1 clk: qcom: common: Detach the power domain at the end of probe

None of the CCs actually need the PD attached to their device, but rather some GDSCs registered by those CCs need that PD as a parent in order to propagate power gating and the performance state.

So lets detach the PD from the CC right at the end of probe, after everything has been successfully set up.

---
 drivers/clk/qcom/common.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/qcom/common.c +2 -0
index 75f09e6e057e..c918c91775ae 100644
@@ -303,6 +303,8 @@ int qcom_cc_really_probe(struct platform_device *pdev,
 	if (ret)
 		return ret;
 
+	dev_pm_domain_detach(dev, true);
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(qcom_cc_really_probe);
Signature · 1 line
2.34.1
#1 lore raw
Quoted 7 lines · Abel Vesa

None of the CCs actually need the PD attached to their device, but rather some GDSCs registered by those CCs need that PD as a parent in order to propagate power gating and the performance state.

So lets detach the PD from the CC right at the end of probe, after everything has been successfully set up.

Would it still be possible to read the clock registers if we detach the device from the domain?
I think it was the original issue behind putting the dispcc/videocc into the MMCX domain: to be able to poke into the clock registers, which are gated by the MMCX.

Quoted 1 line
Signature · 2 lines
With best wishes
Dmitry
author
#2 lore raw
Quoted 6 lines · Dmitry Baryshkov
Quoted 5 lines · Abel Vesa

None of the CCs actually need the PD attached to their device, but rather some GDSCs registered by those CCs need that PD as a parent in order to propagate power gating and the performance state.

Quoted 8 lines
Quoted 2 lines

So lets detach the PD from the CC right at the end of probe, after everything has been successfully set up.

Would it still be possible to read the clock registers if we detach the device from the domain?
I think it was the original issue behind putting the dispcc/videocc into the MMCX domain: to be able to poke into the clock registers, which are gated by the MMCX.

+Rajendra

OK, so I might be wrong here, so I'll need to double check. But, AFAICT, today, most of the CCs devicetree nodes do not have a power-domain property. So I assuming the PD is never really needed for register access by the CC itself, but its only use is to be set as parent to those GDSCs that do not have specified a different parent.

Again, I need to double check.

Quoted 8 lines
Quoted 3 lines

--
With best wishes
Dmitry

maintainer
#3 lore raw
In reply to Dmitry Baryshkov
Quoted 6 lines · Dmitry Baryshkov
Quoted 5 lines · Abel Vesa

None of the CCs actually need the PD attached to their device, but rather some GDSCs registered by those CCs need that PD as a parent in order to propagate power gating and the performance state.

Quoted 9 lines
Quoted 2 lines

So lets detach the PD from the CC right at the end of probe, after everything has been successfully set up.

Would it still be possible to read the clock registers if we detach the device from the domain?
I think it was the original issue behind putting the dispcc/videocc into the MMCX domain: to be able to poke into the clock registers, which are gated by the MMCX.

I share the understanding, that on several modern platforms e.g. dispcc was shown to depend on mmcx and the associated gcc abh clock being enabled.

@Abel, could you please verify this on 8250/8350/8450?

Regards,
Bjorn

Quoted 7 lines
Quoted 2 lines
Signature · 2 lines
With best wishes
Dmitry