Skip to content

Commit 3aa6623

Browse files
committed
drivers: firmware: scmi: clear rx channel status in rx notification cb
Clear the SCMI shared memory channel status after processing RX notifications in the mailbox callback for proper P2A flow management. In SCMI P2A (Platform to Application) flow, the application side must explicitly clear the channel status after processing incoming messages from the platform. This is different from A2P (Application to Platform) TX flow where the cleanup is handled by the peer (platform) side. Signed-off-by: Yongxu Wang <[email protected]>
1 parent eeb831c commit 3aa6623

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/firmware/scmi/mailbox.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ static void scmi_mbox_rx_notify_cb(const struct device *mbox,
2727
struct mbox_msg *data)
2828
{
2929
struct scmi_channel *scmi_chan = user_data;
30+
struct scmi_mbox_channel *mbox_chan = scmi_chan->data;
31+
const struct device *shmem = mbox_chan->shmem;
3032

3133
if (scmi_chan->cb) {
3234
scmi_chan->cb(scmi_chan);
35+
scmi_shmem_clear_channel_status(shmem);
3336
}
3437
}
3538

0 commit comments

Comments
 (0)