Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Andy Gross <agross@kernel.org>, Georgi Djakov <djakov@kernel.org>,
	Evan Green <evgreen@chromium.org>, Jun Nie <jun.nie@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Brian Masney <masneyb@onstation.org>,
	Yassine Oudjana <y.oudjana@protonmail.com>,
	Georgi Djakov <georgi.djakov@linaro.org>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 08/10] interconnect: qcom: msm8996: Specify no bus clock scaling on A0NoC
Date: Thu, 23 Feb 2023 06:07:10 -0800	[thread overview]
Message-ID: <20230223140710.72qcxcvyme5npf2v@ripper> (raw)
In-Reply-To: <5a2f502a-6530-dc8c-a81e-3d2a33964366@linaro.org>

On Fri, Feb 17, 2023 at 09:28:54PM +0100, Konrad Dybcio wrote:
> 
> 
> On 17.02.2023 21:26, Dmitry Baryshkov wrote:
> > On Fri, 17 Feb 2023 at 21:53, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> >>
> >>
> >>
> >> On 17.02.2023 20:27, Konrad Dybcio wrote:
> >>>
> >>>
> >>> On 17.02.2023 11:46, Konrad Dybcio wrote:
> >>>> A0NoC only does bus scaling through RPM votes and does not have any
> >>>> ICC clocks. Describe this.
> >>>>
> >>>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> >>>> ---
> >>> This is bad, as devm_clk_get_bulk{"", _optional} doesn't
> >>> check if num_clocks makes sense and passes "-1" down the
> >>> devres alloc chain..
> >>>
> >>> I'll rework this for the next revision by simply assigning
> >>> the common "bus", "bus_a" set everywhere instead of relying
> >>> on it being there by default..
> >> Or maybe I shouldn't, as that will require redefining the array
> >> over and over again.. Perhaps just passing <&xo_board>, <&xo_board>
> >> to a0noc's "bus", "bus_a", similar to what's been done on SDM630's
> >> GNoC would be less messy?
> > 
> > What about simply skipping a call to devm_clk_get if num_bus_clocks is negative?
> I tested that locally before reporting the mistake on my side and
> while it works, I just consider it.. ugly, because:
> 
> num_clocks =
> >0 => use the externally specified num_/clocks (logical)
> =0 => use the default 2

Why not let go of this "convenience" and have num_clocks actually mean
number of clocks?

Regards,
Bjorn

> <0 => consider there's zero
> 
> ..but maybe that's just me.. if you don't find it ugly, I may just
> go with that.
> 
> Konrad
> > 
> >>
> >> Konrad
> >>>
> >>> Konrad
> >>>>  drivers/interconnect/qcom/msm8996.c | 1 +
> >>>>  1 file changed, 1 insertion(+)
> >>>>
> >>>> diff --git a/drivers/interconnect/qcom/msm8996.c b/drivers/interconnect/qcom/msm8996.c
> >>>> index 1a5e0ad36cc4..45eb8675fb11 100644
> >>>> --- a/drivers/interconnect/qcom/msm8996.c
> >>>> +++ b/drivers/interconnect/qcom/msm8996.c
> >>>> @@ -1817,6 +1817,7 @@ static const struct qcom_icc_desc msm8996_a0noc = {
> >>>>      .type = QCOM_ICC_NOC,
> >>>>      .nodes = a0noc_nodes,
> >>>>      .num_nodes = ARRAY_SIZE(a0noc_nodes),
> >>>> +    .num_bus_clocks = -1, /* No bus clock scaling */
> >>>>      .intf_clocks = a0noc_intf_clocks,
> >>>>      .num_intf_clocks = ARRAY_SIZE(a0noc_intf_clocks),
> >>>>      .has_bus_pd = true,
> >>>>
> > 
> > 
> > 

  parent reply	other threads:[~2023-02-23 14:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 10:46 [PATCH v5 00/10] The great interconnecification fixation Konrad Dybcio
2023-02-17 10:46 ` [PATCH v5 01/10] interconnect: qcom: rpm: make QoS INVALID default, separate out driver data Konrad Dybcio
2023-02-23 13:01   ` Bryan O'Donoghue
2023-02-17 10:46 ` [PATCH v5 02/10] interconnect: qcom: rpm: Add support for specifying channel num Konrad Dybcio
2023-02-17 10:46 ` [PATCH v5 03/10] interconnect: qcom: Sort kerneldoc entries Konrad Dybcio
2023-02-17 10:46 ` [PATCH v5 04/10] interconnect: qcom: rpm: Rename icc desc clocks to bus_blocks Konrad Dybcio
2023-02-17 10:46 ` [PATCH v5 05/10] interconnect: qcom: rpm: Rename icc provider num_clocks to num_bus_clocks Konrad Dybcio
2023-02-17 10:46 ` [PATCH v5 06/10] interconnect: qcom: rpm: Handle interface clocks Konrad Dybcio
2023-02-17 10:46 ` [PATCH v5 07/10] interconnect: qcom: icc-rpm: Allow negative num_bus_clocks Konrad Dybcio
2023-02-17 10:46 ` [PATCH v5 08/10] interconnect: qcom: msm8996: Specify no bus clock scaling on A0NoC Konrad Dybcio
2023-02-17 19:27   ` Konrad Dybcio
2023-02-17 19:53     ` Konrad Dybcio
2023-02-17 20:26       ` Dmitry Baryshkov
2023-02-17 20:28         ` Konrad Dybcio
2023-02-17 22:19           ` Dmitry Baryshkov
2023-02-23 14:07           ` Bjorn Andersson [this message]
2023-02-23 14:17             ` Konrad Dybcio
2023-02-17 10:46 ` [PATCH v5 09/10] interconnect: qcom: rpm: Don't use clk_get_optional for bus clocks anymore Konrad Dybcio
2023-02-17 10:46 ` [PATCH v5 10/10] interconnect: qcom: msm8996: Promote to core_initcall 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=20230223140710.72qcxcvyme5npf2v@ripper \
    --to=andersson@kernel.org \
    --cc=agross@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=djakov@kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=evgreen@chromium.org \
    --cc=georgi.djakov@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jun.nie@linaro.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=masneyb@onstation.org \
    --cc=y.oudjana@protonmail.com \
    /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