Linux clock framework development
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Abel Vesa <abel.vesa@linaro.org>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Andy Gross <agross@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Johan Hovold <johan+linaro@kernel.org>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Subject: Re: [PATCH v6 00/12] Unregister critical branch clocks + some RPM
Date: Wed, 24 Jan 2024 13:31:06 +0100	[thread overview]
Message-ID: <6aa58497-9727-4601-b6eb-264c478997c3@linaro.org> (raw)
In-Reply-To: <ZbC/QqfTvJ09KcZN@linaro.org>



On 1/24/24 08:41, Abel Vesa wrote:
> On 24-01-13 15:50:49, Konrad Dybcio wrote:
>> On Qualcomm SoCs, certain branch clocks either need to be always-on, or
>> should be if you're interested in touching some part of the hardware.
>>
>> Using CLK_IS_CRITICAL for this purpose sounds like a genius idea,
>> however that messes with the runtime pm handling - if a clock is
>> marked as such, the clock controller device will never enter the
>> "suspended" state, leaving the associated resources online, which in
>> turn breaks SoC-wide suspend.
> 
> Generally speaking, HW-wise, if the power domain of a clock controller
> is being disabled, all clocks that it provides are being disabled.

Generally speaking, if that's the case, that's true.

> 
> Are you saying that is not the case ?

Dragons however, are peculiar creatures and it seems like the clock
controllers are not *really* disabled when we think they are,
e.g. due to RPM(h) owning a share of GCC clocks, or due to the
MX rail being always-on. It would indeed be an issue with
hibernation where the registers would need to be reprogrammed
after battery power is removed.

As we spoke off-list, I'll split this series into two: adding
common helpers and then taking care of 2290/6375/6115.

I'm not yet sure how far we can go with converting existing clock
drivers to use pm_clk_add so that the _AHB, _XO, and _SLEEP clocks
for a given subsystem are only enabled when necessary - if we
require an entry in clock-names, backwards compatibility goes away,
and if we don't - we potentially miss out on a devlink between X_CC
and GCC, plus the name needs to be hardcoded for global parent lookup.

For new drivers, we'll likely just require a clean solution (runtime
PM enabled + subsys clocks gotten as pm_clk through a dt entry on
the consumer).


Konrad

  reply	other threads:[~2024-01-24 12:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-13 14:50 [PATCH v6 00/12] Unregister critical branch clocks + some RPM Konrad Dybcio
2024-01-13 14:50 ` [PATCH v6 01/12] clk: qcom: branch: Add a helper for setting the enable bit Konrad Dybcio
2024-01-13 21:18   ` Dmitry Baryshkov
2024-01-23  9:33   ` Imran Shaik
2024-01-24 11:20     ` Dmitry Baryshkov
2024-01-13 14:50 ` [PATCH v6 02/12] clk: qcom: Use qcom_branch_set_clk_en() Konrad Dybcio
2024-01-13 22:13   ` Dmitry Baryshkov
2024-01-13 14:50 ` [PATCH v6 03/12] clk: qcom: gcc-sm6375: Unregister critical clocks Konrad Dybcio
2024-01-16 11:09   ` Johan Hovold
2024-01-13 14:50 ` [PATCH v6 04/12] clk: qcom: gpucc-sm6375: " Konrad Dybcio
2024-01-13 14:50 ` [PATCH v6 05/12] clk: qcom: gpucc-sm6115: " Konrad Dybcio
2024-01-13 14:50 ` [PATCH v6 06/12] clk: qcom: gpucc-sm6115: Add runtime PM Konrad Dybcio
2024-01-13 14:50 ` [PATCH v6 07/12] clk: qcom: gcc-sm6115: Unregister critical clocks Konrad Dybcio
2024-01-13 14:50 ` [PATCH v6 08/12] clk: qcom: gcc-qcm2290: " Konrad Dybcio
2024-01-13 14:50 ` [PATCH v6 09/12] arm64: dts: qcom: sm6375: Add VDD_CX to GCC Konrad Dybcio
2024-01-13 14:50 ` [PATCH v6 10/12] arm64: dts: qcom: qcm2290: " Konrad Dybcio
2024-01-13 14:51 ` [PATCH v6 11/12] arm64: dts: qcom: sm6115: " Konrad Dybcio
2024-01-13 14:51 ` [PATCH v6 12/12] arm64: dts: qcom: sm6115: Add VDD_CX to GPU_CC Konrad Dybcio
2024-01-14  4:53 ` [PATCH v6 00/12] Unregister critical branch clocks + some RPM Dmitry Baryshkov
2024-01-15  9:29   ` Konrad Dybcio
2024-01-24  7:41 ` Abel Vesa
2024-01-24 12:31   ` Konrad Dybcio [this message]
2024-01-25 10:16 ` Taniya Das
2024-01-25 10:56   ` Konrad Dybcio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6aa58497-9727-4601-b6eb-264c478997c3@linaro.org \
    --to=konrad.dybcio@linaro.org \
    --cc=abel.vesa@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=johan+linaro@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox