diff options
| author | Sudeep Holla <sudeep.holla@arm.com> | 2025-10-16 22:08:20 +0300 |
|---|---|---|
| committer | Jassi Brar <jassisinghbrar@gmail.com> | 2026-01-18 23:19:21 +0300 |
| commit | c2b69f71ffd05d494f706d067c8dbcdbb7e6b901 (patch) | |
| tree | 280a92cbc31ad4f4803c923b2c5e23b0f60dd2eb | |
| parent | 9f3bbbb72ad03378c45523b8045ac82d1ba28ae6 (diff) | |
| download | linux-c2b69f71ffd05d494f706d067c8dbcdbb7e6b901.tar.xz | |
mailbox: pcc: Clear any pending responder interrupts before enabling it
Some platforms may leave a responder interrupt pending from earlier
transactions. If a PCC responder channel has a pending interrupt when
the controller starts up, enabling the IRQ line without first clearing
the condition can lead to a spurious interrupt which could disrupt other
transmissions if the IRQ is shared.
Explicitly clear any pending responder interrupt before enabling the IRQ
to ensure a clean start. Acknowledge the responder channel via
pcc_chan_acknowledge() in startup before requesting/enablement of the
IRQ. This ensures a clean baseline for the first transfer/receiption
of the notification/response.
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Tested-by: Adam Young <admiyo@os.amperecomputing.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
| -rw-r--r-- | drivers/mailbox/pcc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index d8739eca5ac0..967eb249f40d 100644 --- a/drivers/mailbox/pcc.c +++ b/drivers/mailbox/pcc.c @@ -467,6 +467,12 @@ static int pcc_startup(struct mbox_chan *chan) unsigned long irqflags; int rc; + /* + * Clear and acknowledge any pending interrupts on responder channel + * before enabling the interrupt + */ + pcc_chan_acknowledge(pchan); + if (pchan->plat_irq > 0) { irqflags = pcc_chan_plat_irq_can_be_shared(pchan) ? IRQF_SHARED | IRQF_ONESHOT : 0; |
