Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mailbox: pcc: Wire up ->last_tx_done() for PCC channels

Some PCC users poll for completion between transfers and benefit from
the knowledge of previous Tx completion check through the mailbox
framework's ->last_tx_done() op.

Hook up the last_tx_done callback in the PCC mailbox driver so the mailbox
framework can correctly query the completion status of the last transmitted
message. This aligns PCC with other controllers that already implement such
last_tx_done status query.

No functional change unless callers use ->last_tx_done(). Normal Tx and
IRQ paths are unchanged. This change just improves synchronization and
avoids unnecessary timeouts for non-interrupt driven channels by ensuring
correct completion detection for PCC channels that don’t rely on interrupts.

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>

authored by

Sudeep Holla and committed by
Jassi Brar
a5695ded f82c3e62

+8
+8
drivers/mailbox/pcc.c
··· 444 444 return ret; 445 445 } 446 446 447 + static bool pcc_last_tx_done(struct mbox_chan *chan) 448 + { 449 + struct pcc_chan_info *pchan = chan->con_priv; 450 + 451 + return pcc_mbox_cmd_complete_check(pchan); 452 + } 453 + 447 454 /** 448 455 * pcc_startup - Called from Mailbox Controller code. Used here 449 456 * to request the interrupt. ··· 496 489 .send_data = pcc_send_data, 497 490 .startup = pcc_startup, 498 491 .shutdown = pcc_shutdown, 492 + .last_tx_done = pcc_last_tx_done, 499 493 }; 500 494 501 495 /**