mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix BWMONv4 for <SDM845
@ 2023-03-04 15:39 Konrad Dybcio
  2023-03-04 15:39 ` [PATCH 1/3] dt-bindings: interconnect: qcom,msm8998-bwmon: Add global registers Konrad Dybcio
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Konrad Dybcio @ 2023-03-04 15:39 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Krzysztof Kozlowski, Georgi Djakov,
	Rob Herring, Thara Gopinath
  Cc: linux-arm-msm, linux-pm, devicetree, linux-kernel, Konrad Dybcio

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>


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-03-06 12:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-04 15:39 [PATCH 0/3] Fix BWMONv4 for <SDM845 Konrad Dybcio
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

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®