summaryrefslogtreecommitdiff
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorMatti Lehtimäki <matti.lehtimaki@gmail.com>2025-05-12 02:40:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-06-04 14:40:19 +0200
commit8509fb9dec13ef29a8e4cc5b8cbee9293c716c9e (patch)
tree00a87fcd60e4f7f6f4159acc08cc1634ba610759 /drivers/remoteproc
parentd19d0157edd69a18f5bf77aac4d614f2a831b6b5 (diff)
downloadlinux-8509fb9dec13ef29a8e4cc5b8cbee9293c716c9e.tar.gz
linux-8509fb9dec13ef29a8e4cc5b8cbee9293c716c9e.tar.bz2
linux-8509fb9dec13ef29a8e4cc5b8cbee9293c716c9e.zip
remoteproc: qcom_wcnss: Fix on platforms without fallback regulators
[ Upstream commit 4ca45af0a56d00b86285d6fdd720dca3215059a7 ] Recent change to handle platforms with only single power domain broke pronto-v3 which requires power domains and doesn't have fallback voltage regulators in case power domains are missing. Add a check to verify the number of fallback voltage regulators before using the code which handles single power domain situation. Fixes: 65991ea8a6d1 ("remoteproc: qcom_wcnss: Handle platforms with only single power domain") Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com> Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sdm632-fairphone-fp3 Link: https://lore.kernel.org/r/20250511234026.94735-1-matti.lehtimaki@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/qcom_wcnss.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index ce61e0e7cbeb..af96541c9b69 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -445,7 +445,8 @@ static int wcnss_init_regulators(struct qcom_wcnss *wcnss,
if (wcnss->num_pds) {
info += wcnss->num_pds;
/* Handle single power domain case */
- num_vregs += num_pd_vregs - wcnss->num_pds;
+ if (wcnss->num_pds < num_pd_vregs)
+ num_vregs += num_pd_vregs - wcnss->num_pds;
} else {
num_vregs += num_pd_vregs;
}