]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
soc: qcom: rpmh-rsc: Unconditionally clear _TRIGGER bit for TCS
authorSneh Mankad <sneh.mankad@oss.qualcomm.com>
Mon, 25 Aug 2025 06:23:50 +0000 (11:53 +0530)
committerBjorn Andersson <andersson@kernel.org>
Wed, 27 Aug 2025 17:27:20 +0000 (12:27 -0500)
Unconditionally clear the TCS_AMC_MODE_TRIGGER bit when a
transaction completes. Previously this bit was only cleared when
a wake TCS was borrowed as an AMC TCS but not for dedicated
AMC TCS. Leaving this bit set for AMC TCS and entering deeper low
power modes can generate a false completion IRQ.

Prevent this scenario by always clearing the TCS_AMC_MODE_TRIGGER
bit upon receiving a completion IRQ.

Fixes: 15b3bf61b8d4 ("soc: qcom: rpmh-rsc: Clear active mode configuration for wake TCS")
Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250825-rpmh_rsc_change-v1-1-138202c31bf6@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/rpmh-rsc.c

index fdab2b1067dbb13efbbef5cc3ef795a65fc2d6a1..c6f7d5c9c493d9e06c048930b8a14a38660df4b1 100644 (file)
@@ -453,13 +453,10 @@ static irqreturn_t tcs_tx_done(int irq, void *p)
 
                trace_rpmh_tx_done(drv, i, req);
 
-               /*
-                * If wake tcs was re-purposed for sending active
-                * votes, clear AMC trigger & enable modes and
+               /* Clear AMC trigger & enable modes and
                 * disable interrupt for this TCS
                 */
-               if (!drv->tcs[ACTIVE_TCS].num_tcs)
-                       __tcs_set_trigger(drv, i, false);
+               __tcs_set_trigger(drv, i, false);
 skip:
                /* Reclaim the TCS */
                write_tcs_reg(drv, drv->regs[RSC_DRV_CMD_ENABLE], i, 0);