From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Georgi Djakov <djakov@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Thara Gopinath <thara.gopinath@gmail.com>
Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Konrad Dybcio <konrad.dybcio@linaro.org>
Subject: [PATCH 0/3] Fix BWMONv4 for <SDM845
Date: Sat, 04 Mar 2023 16:39:18 +0100 [thread overview]
Message-ID: <20230304-topic-ddr_bwmon-v1-0-e563837dc7d1@linaro.org> (raw)
BWMONv4 (the one used for DDR scaling on all SoCs from msm8998 to sm8550)
features two register regions: "monitor" and "global" with the first one
containing registers specific to the throughput monitor itself and the
second one containing some sort of a head switch.
The register layout on all BWMON versions an implementations up to that
looked like this:
|..........[GLOBAL].........[MONITOR]........|
however with SDM845 somebody thought it would be a good idea to turn it
into this:
|................[GLOBAL]....................|
|....................[MONITOR]...............|
Sadly, the existing upstream driver was architected with SDM845 in mind,
which means it doesn't support the global registers being somewhere else
than near the beginning of the monitor space. This series tries to address
that in the hopefully least painful way. Tested on msm8998 (the count unit
seems to be wrong, should probably be 1MiB and not 64 KiB but the point is
that this series makes it work at all, as without it the headswitch is
never turned on) and SM6375 (with the "combined" layout introduced in
SDM845). Equally sadly, everybody uses the qcom,msm8998-bwmon compatible
(which frankly should have been just qcom,bwmon-v4) that never actually
worked on MSM8998 , which prevents us from handling it in a simpler way..
While at it, an unused struct member is removed.
One suboptimal feature of this patchset is that it introduces an "invalid
resource" print from within devres. This could be solved with an
introduction of devm_ioremap_resource_optional or by dropping devres
functions in place of manual handling, which also doesn't sound great..
I'll leave it up to the reviewers to decide.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Konrad Dybcio (3):
dt-bindings: interconnect: qcom,msm8998-bwmon: Add global registers
soc: qcom: icc-bwmon: Handle global registers correctly
soc: qcom: icc-bwmon: Remove unused struct member
.../bindings/interconnect/qcom,msm8998-bwmon.yaml | 28 ++++-
drivers/soc/qcom/icc-bwmon.c | 137 ++++++++++++++++++---
2 files changed, 142 insertions(+), 23 deletions(-)
---
base-commit: 1acf39ef8f1425cd105f630dc2c7c1d8fff27ed1
change-id: 20230304-topic-ddr_bwmon-609022cd5e35
Best regards,
--
Konrad Dybcio <konrad.dybcio@linaro.org>
next reply other threads:[~2023-03-04 15:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-04 15:39 Konrad Dybcio [this message]
2023-03-04 15:39 ` [PATCH 1/3] dt-bindings: interconnect: qcom,msm8998-bwmon: Add global registers Konrad Dybcio
2023-03-05 14:52 ` Krzysztof Kozlowski
2023-03-06 9:54 ` Konrad Dybcio
2023-03-04 15:39 ` [PATCH 2/3] soc: qcom: icc-bwmon: Handle global registers correctly Konrad Dybcio
2023-03-05 15:06 ` Krzysztof Kozlowski
2023-03-06 10:06 ` Konrad Dybcio
2023-03-06 12:09 ` Krzysztof Kozlowski
2023-03-06 12:17 ` Konrad Dybcio
2023-03-06 12:36 ` Krzysztof Kozlowski
2023-03-04 15:39 ` [PATCH 3/3] soc: qcom: icc-bwmon: Remove unused struct member Konrad Dybcio
2023-03-05 15:07 ` Krzysztof Kozlowski
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=20230304-topic-ddr_bwmon-v1-0-e563837dc7d1@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=djakov@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.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
all inboxes | Powered by JetHome®