OpenCloudOS-Kernel/include/soc/qcom
Maulik Shah 6a283d64b4 soc: qcom: rpmh-rsc: Enhance check for VRM in-flight request
commit f592cc5794747b81e53b53dd6e80219ee25f0611 upstream.

Each RPMh VRM accelerator resource has 3 or 4 contiguous 4-byte aligned
addresses associated with it. These control voltage, enable state, mode,
and in legacy targets, voltage headroom. The current in-flight request
checking logic looks for exact address matches. Requests for different
addresses of the same RPMh resource as thus not detected as in-flight.

Add new cmd-db API cmd_db_match_resource_addr() to enhance the in-flight
request check for VRM requests by ignoring the address offset.

This ensures that only one request is allowed to be in-flight for a given
VRM resource. This is needed to avoid scenarios where request commands are
carried out by RPMh hardware out-of-order leading to LDO regulator
over-current protection triggering.

Fixes: 658628e7ef ("drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs")
Cc: stable@vger.kernel.org
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Tested-by: Elliot Berman <quic_eberman@quicinc.com> # sm8650-qrd
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
Link: https://lore.kernel.org/r/20240215-rpmh-rsc-fixes-v4-1-9cbddfcba05b@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-16 13:47:33 +02:00
..
cmd-db.h soc: qcom: rpmh-rsc: Enhance check for VRM in-flight request 2024-06-16 13:47:33 +02:00
ice.h soc: qcom: Make the Qualcomm UFS/SDCC ICE a dedicated driver 2023-04-07 12:08:39 -07:00
kryo-l2-accessors.h soc: qcom: Separate kryo l2 accessors from PMU driver 2020-07-10 17:08:55 -07:00
ocmem.h soc: qcom: ocmem: add missing includes 2019-10-07 08:19:43 -07:00
qcom-spmi-pmic.h soc: qcom: socinfo: rename PM2250 to PM4125 2024-03-26 18:19:23 -04:00
rpmh.h soc: qcom: rpmh: Update rpmh_invalidate function to return void 2020-06-22 14:23:46 -07:00
spm.h soc: qcom: spm: Implement support for SAWv4.1, SDM630/660 L2 AVS 2021-09-21 17:41:48 -05:00
tcs.h soc: qcom: rpmh: Remove serialization of TCS commands 2021-01-07 10:59:46 -06:00