From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Georgi Djakov <djakov@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Thara Gopinath <thara.gopinath@gmail.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Marijn Suijten <marijn.suijten@somainline.org>
Subject: Re: [PATCH v3 3/7] soc: qcom: icc-bwmon: Handle global registers correctly
Date: Thu, 16 Mar 2023 07:38:39 +0100 [thread overview]
Message-ID: <0f5003b8-588c-2477-2d82-e6cabd77277b@linaro.org> (raw)
In-Reply-To: <20230304-topic-ddr_bwmon-v3-3-77a050c2fbda@linaro.org>
On 15/03/2023 15:11, Konrad Dybcio wrote:
> The BWMON hardware has two sets of registers: one for the monitor itself
> and one called "global". It has what seems to be some kind of a head
> switch and an interrupt control register. It's usually 0x200 in size.
>
> On fairly recent SoCs (with the starting point seemingly being moving
> the OSM programming to the firmware) these two register sets are
> contiguous and overlapping, like this (on sm8450):
>
> /* notice how base.start == global_base.start+0x100 */
> reg = <0x90b6400 0x300>, <0x90b6300 0x200>;
> reg-names = "base", "global_base";
>
> Which led to some confusion and the assumption that since the
> "interesting" global registers begin right after global_base+0x100,
> there's no need to map two separate regions and one can simply subtract
> 0x100 from the offsets.
>
> This is however not the case for anything older than SDM845, as the
> global region can appear in seemingly random spots on the register map.
>
> Handle the case where the global registers are mapped separately to allow
> proper functioning of BWMONv4 on MSM8998 and older. Add specific
> compatibles for 845, 8280xp, 7280 and 8550 (all of which use the single
> reg space scheme) to keep backwards compatibility with old DTs.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> drivers/soc/qcom/icc-bwmon.c | 230 +++++++++++++++++++++++++++++++++++++++----
> 1 file changed, 209 insertions(+), 21 deletions(-)
>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-03-16 6:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-15 14:11 [PATCH v3 0/7] Fix BWMONv4 for <SDM845 Konrad Dybcio
2023-03-15 14:11 ` [PATCH v3 1/7] dt-bindings: interconnect: qcom,msm8998-bwmon: Resolve MSM8998 support Konrad Dybcio
2023-04-04 19:35 ` Bjorn Andersson
2023-04-04 20:28 ` Georgi Djakov
2023-03-15 14:11 ` [PATCH v3 2/7] soc: qcom: icc-bwmon: Remove unused struct member Konrad Dybcio
2023-03-15 14:11 ` [PATCH v3 3/7] soc: qcom: icc-bwmon: Handle global registers correctly Konrad Dybcio
2023-03-16 6:38 ` Krzysztof Kozlowski [this message]
2023-03-15 14:11 ` [PATCH v3 4/7] arm64: dts: qcom: sc7280: Use the correct BWMON fallback compatible Konrad Dybcio
2023-03-15 14:11 ` [PATCH v3 5/7] arm64: dts: qcom: sc8280xp: " Konrad Dybcio
2023-03-15 14:11 ` [PATCH v3 6/7] arm64: dts: qcom: sdm845: Use the correct BWMON compatible Konrad Dybcio
2023-03-15 14:11 ` [PATCH v3 7/7] arm64: dts: qcom: sm8550: Use the correct BWMON fallback compatible Konrad Dybcio
2023-03-16 9:12 ` Neil Armstrong
2023-04-05 4:08 ` (subset) [PATCH v3 0/7] Fix BWMONv4 for <SDM845 Bjorn Andersson
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=0f5003b8-588c-2477-2d82-e6cabd77277b@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=djakov@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robh+dt@kernel.org \
--cc=thara.gopinath@gmail.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;
as well as URLs for NNTP newsgroup(s).