diff options
| author | Neil Armstrong <[email protected]> | 2026-01-08 21:28:43 +0100 |
|---|---|---|
| committer | Casey Connolly <[email protected]> | 2026-01-14 16:25:09 +0100 |
| commit | 83dd2675d04f5247d6796fa6294d717069fae19c (patch) | |
| tree | 211380715a4ac7d96eb76ad736f11c0a18e589e7 /drivers | |
| parent | d38ec14953ebe682d4b8af025050a32b5ecb32eb (diff) | |
soc: qcom: rpmh-rsc: reclaim the TCS to avoid spurious irq in Linux
If we don't reclaim and clear the IRQ bits, we might get a spurious
interrupt from this TCS in Linux:
WARNING: CPU: 0 PID: 0 at drivers/soc/qcom/rpmh-rsc.c:451 tcs_tx_done+0x98/0x270
...
Call trace:
tcs_tx_done+0x98/0x270 (P)
__handle_irq_event_percpu+0x60/0x220
handle_irq_event+0x54/0xc0
handle_fasteoi_irq+0xa8/0x1c0
handle_irq_desc+0x3c/0x68
generic_handle_domain_irq+0x24/0x40
gic_handle_irq+0x5c/0xd0
...
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Casey Connolly <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/soc/qcom/rpmh-rsc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c index aee9e55194e..bc0c3dd005a 100644 --- a/drivers/soc/qcom/rpmh-rsc.c +++ b/drivers/soc/qcom/rpmh-rsc.c @@ -400,6 +400,13 @@ int rpmh_rsc_send_data(struct rsc_drv *drv, const struct tcs_request *msg) udelay(1); } + __tcs_set_trigger(drv, tcs_id, false); + + /* Reclaim the TCS */ + write_tcs_reg(drv, drv->regs[RSC_DRV_CMD_ENABLE], tcs_id, 0); + writel_relaxed(BIT(tcs_id), drv->tcs_base + drv->regs[RSC_DRV_IRQ_CLEAR]); + generic_clear_bit(tcs_id, drv->tcs_in_use); + if (i == USEC_PER_SEC) { log_err("%s: error writing %#x to %d:%#x\n", drv->name, msg->cmds[0].addr, tcs_id, drv->regs[RSC_DRV_CMD_ADDR]); |
