linux/include/soc/qcom
Maulik Shah f592cc5794 soc: qcom: rpmh-rsc: Enhance check for VRM in-flight request
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>
2024-04-21 12:11:40 -05:00
..
cmd-db.h soc: qcom: rpmh-rsc: Enhance check for VRM in-flight request 2024-04-21 12:11:40 -05: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-01-27 21:45:49 -06: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: remove driver-internal structures from the driver API 2024-02-16 11:30:57 -06:00
tcs.h soc: qcom: rpmh: Remove serialization of TCS commands 2021-01-07 10:59:46 -06:00