From: Stephan Gerhold <stephan@gerhold.net>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
linux-arm-msm@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht,
Maulik Shah <mkshah@codeaurora.org>
Subject: Re: [PATCH 2/3] soc: qcom: stats: Add fixed sleep stats offset for older RPM firmwares
Date: Thu, 18 Nov 2021 11:45:58 +0100 [thread overview]
Message-ID: <YZYu5scy/fAetKaH@gerhold.net> (raw)
In-Reply-To: <YZWlyiY0FH489cYz@builder.lan>
On Wed, Nov 17, 2021 at 07:00:58PM -0600, Bjorn Andersson wrote:
> On Mon 18 Oct 06:08 CDT 2021, Stephan Gerhold wrote:
>
> > Not all RPM firmware versions have the dynamic sleep stats offset
> > available. Older versions use a fixed offset of 0xdba0.
> >
> > Add support for this using a new qcom,rpm-legacy-stats compatible
> > that can be used for older SoCs like MSM8916.
> >
> > Suggested-by: Maulik Shah <mkshah@codeaurora.org>
> > Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> > ---
> > drivers/soc/qcom/qcom_stats.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/soc/qcom/qcom_stats.c b/drivers/soc/qcom/qcom_stats.c
> > index 817505bd99b5..67728de718fd 100644
> > --- a/drivers/soc/qcom/qcom_stats.c
> > +++ b/drivers/soc/qcom/qcom_stats.c
> > @@ -237,6 +237,15 @@ static const struct stats_config rpm_data = {
> > .subsystem_stats_in_smem = false,
> > };
> >
> > +/* Older RPM firmwares have the stats at a fixed offset instead */
> > +static const struct stats_config rpm_legacy_data = {
> > + .stats_offset = 0xdba0,
> > + .num_records = 2,
> > + .appended_stats_avail = true,
> > + .dynamic_offset = false,
> > + .subsystem_stats_in_smem = false,
> > +};
>
> Is this the only variation that existed back in the "legacy" days? Will
> we end up with multiple "legacy" variants?
>
I think most old platforms that are still somewhat maintained use 0xdba0
(e.g. MSM8916, MSM8974, APQ8084, MSM8226).
I found a different offset for APQ8064, MSM8960, but they also seem to
use a different stats format ("v1" instead of "v2") which is not
currently supported by the qcom_stats driver here.
I guess I could add SoC-specific compatibles if you prefer (e.g.
"qcom,rpm-stats-msm8916"), or do you have any other suggestion?
Thanks,
Stephan
next prev parent reply other threads:[~2021-11-18 10:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 11:08 [PATCH 0/3] Add RPM sleep stats for MSM8916 Stephan Gerhold
2021-10-18 11:08 ` [PATCH 1/3] dt-bindings: soc: qcom: stats: Document qcom,rpm-legacy-stats Stephan Gerhold
2021-10-21 9:29 ` Maulik Shah
2021-10-26 23:38 ` Rob Herring
2021-10-18 11:08 ` [PATCH 2/3] soc: qcom: stats: Add fixed sleep stats offset for older RPM firmwares Stephan Gerhold
2021-10-21 9:30 ` Maulik Shah
2021-11-18 1:00 ` Bjorn Andersson
2021-11-18 10:45 ` Stephan Gerhold [this message]
2021-11-18 20:58 ` Bjorn Andersson
2021-11-18 21:26 ` Stephan Gerhold
2021-10-18 11:08 ` [PATCH 3/3] arm64: dts: qcom: msm8916: Add RPM sleep stats Stephan Gerhold
2021-10-21 9:30 ` Maulik Shah
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=YZYu5scy/fAetKaH@gerhold.net \
--to=stephan@gerhold.net \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=mkshah@codeaurora.org \
--cc=robh+dt@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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