From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Taniya Das <quic_tdas@quicinc.com>
Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
freedreno@lists.freedesktop.org, Rob Clark <robdclark@gmail.com>
Subject: Re: [RFC PATCH 1/2] clk: qcom: implement RCG2 'parked' clock support
Date: Wed, 4 Oct 2023 10:27:24 +0100 [thread overview]
Message-ID: <f129633e-4df7-4984-a19e-c16e6c7c8f3f@linaro.org> (raw)
In-Reply-To: <20231004003125.2289613-2-dmitry.baryshkov@linaro.org>
On 04/10/2023 01:31, Dmitry Baryshkov wrote:
> clk_rcg2_shared_ops implements support for the case of the RCG which
> must not be completely turned off. However its design has one major
> drawback: it doesn't allow us to properly implement the is_enabled
> callback, which causes different kinds of misbehaviour from the CCF.
>
> Follow the idea behind clk_regmap_phy_mux_ops and implement the new
> clk_rcg2_parked_ops. It also targets the clocks which must not be fully
> switched off (and shared most of the implementation with
> clk_rcg2_shared_ops). The major difference is that it requires that the
> parent map doesn't conain the safe (parked) clock source. Instead if the
> CFG_REG register points to the safe source, the clock is considered to
> be disabled.
Why not have a new bit in .flags ?
Instead of lying about the clock being off, mark the clock as "parked",
or "safe parked" or whatever term we choose for it ?
I feel 'disabled' should mean disabled and 'enabled' should me enabled
when I read a value from debugfs and if we are parking a clock it should
have a clear means of being flagged as a clock that should be parked.
An example. I recently inherited some autogenerated code for camcc on
sc8280xp.
One of the clocks is marked as CLK_IS_CRITICAL by the autogen code
meaning "never switch off" but CLK_IS_CRITICAL stops the camcc driver
from doing runtime pm_ops to power collapse.
The solution I have is to remove CLK_IS_CRITICAL and to hard-code in
probe() the clock to always on.
But if we had a CLK_DISABLE_SAFE_PARK flag - then not just for rcg but
for branch clocks we could differentiate away from hard-coded always on
in probe...
?
---
bod
next prev parent reply other threads:[~2023-10-04 9:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 0:31 [RFC PATCH 0/2] clk: qcom: provide alternative 'parked' RCG Dmitry Baryshkov
2023-10-04 0:31 ` [RFC PATCH 1/2] clk: qcom: implement RCG2 'parked' clock support Dmitry Baryshkov
2023-10-04 9:27 ` Bryan O'Donoghue [this message]
2023-10-04 12:08 ` Dmitry Baryshkov
2023-10-04 12:52 ` Bryan O'Donoghue
2023-10-04 17:57 ` Dmitry Baryshkov
2023-10-06 23:45 ` Konrad Dybcio
2023-10-07 10:08 ` Bryan O'Donoghue
2023-10-25 9:45 ` Dmitry Baryshkov
2023-10-06 23:43 ` Konrad Dybcio
2023-10-26 18:57 ` Konrad Dybcio
2023-10-26 20:47 ` Dmitry Baryshkov
2023-10-26 20:49 ` Konrad Dybcio
2023-10-26 21:05 ` Dmitry Baryshkov
2023-10-26 22:56 ` Bjorn Andersson
2023-10-27 0:35 ` Dmitry Baryshkov
2023-10-04 0:31 ` [RFC PATCH 2/2] clk: qcom: dispcc-sm8250: switch to clk_rcg2_parked_ops Dmitry Baryshkov
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=f129633e-4df7-4984-a19e-c16e6c7c8f3f@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=freedreno@lists.freedesktop.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=quic_tdas@quicinc.com \
--cc=robdclark@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).