From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43093223DDF; Mon, 2 Jun 2025 14:22:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748874154; cv=none; b=RvqmDLxmz+hVCK4GJI+1ASynOrRLThpb08fD2g9j+YjTEp0IFG+rrWoM6ZCTxomx0pmjaV8JiCNPn+fstxTYyOFWiiHyxaaNLqBCMYC904soySH9PN+th6ViziBKslEgez+jh8bxLPAyYAlcW3KAiQoVfPCcnuOgSfinMOs7glo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748874154; c=relaxed/simple; bh=WRpdCB97+5nLzpW415M0DMqkXUZcvjZ7MtvdtxagAyg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tLJUOGZ+7NBj9Xt+63LLNScqfHNotW7jrbCXQdqjJGos6MOql08VpLUmEAMUylk+lj5wmAtXB7inI0BnB2Mf0V32gp5y6/p8fezUank25R99mMRYGK0d6FD7N4T6MkwWeQo/CWdaVCmzM6ZRVZR+LwoNNHH4xbmEQIVIUNxzm/E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RnxM+FI9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="RnxM+FI9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5935C4CEEB; Mon, 2 Jun 2025 14:22:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748874154; bh=WRpdCB97+5nLzpW415M0DMqkXUZcvjZ7MtvdtxagAyg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RnxM+FI9+PcLxNn6uScnzUG+ZwaIMUjPkOyYq8OC/E146lRWt6elMJo0a7uMSrKE2 u7gYXmVhF/6l0cbeXYGTCN+s1XU1uIGUNL5Owi47uw6sC5T4BMueG7I8kfRjDSLr4k vcLGyi6GfHzGA/Jz5SjRzmaqfb6aAGaeJG4U12DA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= , Bjorn Andersson , Sasha Levin , Luca Weiss Subject: [PATCH 6.6 335/444] remoteproc: qcom_wcnss: Fix on platforms without fallback regulators Date: Mon, 2 Jun 2025 15:46:39 +0200 Message-ID: <20250602134354.526383757@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250602134340.906731340@linuxfoundation.org> References: <20250602134340.906731340@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Matti Lehtimäki [ 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 Tested-by: Luca Weiss # sdm632-fairphone-fp3 Link: https://lore.kernel.org/r/20250511234026.94735-1-matti.lehtimaki@gmail.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- drivers/remoteproc/qcom_wcnss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index 153260b4e2eb4..37174b544113f 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -456,7 +456,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; } -- 2.39.5