From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, Shawn Guo <shawn.guo@linaro.org>,
Taniya Das <quic_tdas@quicinc.com>
Subject: Re: [PATCH RFT 03/20] clk: qcom: smd-rpm: Add support for keepalive votes
Date: Mon, 6 Mar 2023 15:04:16 +0100 [thread overview]
Message-ID: <27109715-ffda-2a4a-ee67-886713103d49@linaro.org> (raw)
In-Reply-To: <afa95a2d-dbf3-621e-a1ed-fa484d288432@linaro.org>
On 6.03.2023 12:28, Konrad Dybcio wrote:
>
>
> On 6.03.2023 02:21, Dmitry Baryshkov wrote:
>> On Sat, 4 Mar 2023 at 15:27, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>>
>>> Some bus clock should always have a minimum (19.2 MHz) vote cast on
>>> them, otherwise the platform will fall apart, hang and reboot.
>>>
>>> Add support for specifying which clocks should be kept alive and
>>> always keep a vote on XO_A to make sure the clock tree doesn't
>>> collapse. This removes the need to keep a maximum vote that was
>>> previously guaranteed by clk_smd_rpm_handoff.
>>>
>>> This commit is a combination of existing (not-exactly-upstream) work
>>> by Taniya Das, Shawn Guo and myself.
>>>
>>> Co-developed-by: Shawn Guo <shawn.guo@linaro.org>
>>> Co-developed-by: Taniya Das <quic_tdas@quicinc.com>
>>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>>> ---
[...]
>>
>>> +
>>> + ret = clk_set_rate(keepalive_clks[i]->clk, 19200000);
>>
>> Don't we also need to provide a determine_rate() that will not allow
>> one to set clock frequency below 19.2 MHz?
> Hm, sounds like a good idea..
Thinking about it again, I'd have to do it before the clocks are registered
and we'd either end up with 2 loops, one assigning the CLK_IS_CRITICAL flag
and the other one setting the rate.. Will that not be too hacky?
Konrad
>
>>
>>> + if (ret)
>>> + return ret;
>>> + }
>>> +
>>> + /* Keep an active vote on CXO in case no other driver votes for it. */
>>> + if (rpm_smd_clks[RPM_SMD_XO_A_CLK_SRC])
>>> + return clk_prepare_enable(rpm_smd_clks[RPM_SMD_XO_A_CLK_SRC]->hw.clk);
>>> +
>>> return 0;
>>> err:
>>> dev_err(&pdev->dev, "Error registering SMD clock driver (%d)\n", ret);
>>
>>
>> I have mixed feelings towards this patch (and the rest of the
>> patchset). It looks to me like we are trying to patch an issue of the
>> interconnect drivers (or in kernel configuration).
> Well, as you noticed, this patch tries to address a situation where a
> critical clock could be disabled. The interconnect driver (as per my
> other recent patchset) also has a concept of "keepalive", but:
>
> 1. not very many SoCs already have a functional icc driver
> 2. devices with an existing interconnect driver should also be
> testable without one (through painful ripping out everything-icc
> from the dts) for regression tracking
>
> Konrad
>
>>
>>
>> --
>> With best wishes
>> Dmitry
next prev parent reply other threads:[~2023-03-06 14:04 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-04 13:27 [PATCH RFT 00/20] SMD RPMCC sleep preparations Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 01/20] clk: qcom: smd-rpm: Add .is_enabled hook Konrad Dybcio
2023-03-06 0:21 ` Dmitry Baryshkov
2023-03-06 0:27 ` Dmitry Baryshkov
2023-03-04 13:27 ` [PATCH RFT 02/20] clk: qcom: smd-rpm: Add .is_prepared hook Konrad Dybcio
2023-03-06 1:05 ` Dmitry Baryshkov
2023-03-04 13:27 ` [PATCH RFT 03/20] clk: qcom: smd-rpm: Add support for keepalive votes Konrad Dybcio
2023-03-06 1:21 ` Dmitry Baryshkov
2023-03-06 11:28 ` Konrad Dybcio
2023-03-06 14:04 ` Konrad Dybcio [this message]
2023-03-04 13:27 ` [PATCH RFT 04/20] clk: qcom: smd-rpm: Add keepalive_clks for SM6375 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 05/20] clk: qcom: smd-rpm: Add keepalive_clks for MSM8996 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 06/20] clk: qcom: smd-rpm: Add keepalive_clks for MSM8909 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 07/20] clk: qcom: smd-rpm: Add keepalive_clks for MSM8916 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 08/20] clk: qcom: smd-rpm: Add keepalive_clks for MSM8936 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 09/20] clk: qcom: smd-rpm: Add keepalive_clks for MSM8974 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 10/20] clk: qcom: smd-rpm: Add keepalive_clks for MSM8976 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 11/20] clk: qcom: smd-rpm: Add keepalive_clks for MSM8992 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 12/20] clk: qcom: smd-rpm: Add keepalive_clks for MSM8994 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 13/20] clk: qcom: smd-rpm: Add keepalive_clks for MSM8998 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 14/20] clk: qcom: smd-rpm: Add keepalive_clks for SDM660 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 15/20] clk: qcom: smd-rpm: Add keepalive_clks for MDM9607 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 16/20] clk: qcom: smd-rpm: Add keepalive_clks for MSM8953 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 17/20] clk: qcom: smd-rpm: Add keepalive_clks for SM6125 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 18/20] clk: qcom: smd-rpm: Add keepalive_clks for SM6115 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 19/20] clk: qcom: smd-rpm: Add keepalive_clks for QCM2290 Konrad Dybcio
2023-03-04 13:27 ` [PATCH RFT 20/20] clk: qcom: smd-rpm: Add keepalive_clks for QCS404 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=27109715-ffda-2a4a-ee67-886713103d49@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=quic_tdas@quicinc.com \
--cc=sboyd@kernel.org \
--cc=shawn.guo@linaro.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
all inboxes | Powered by JetHome®