Skip to content

Commit 3349f80

Browse files
sudeep-hollaJassi Brar
authored andcommitted
mailbox: pcc: Set txdone_irq/txdone_poll based on PCCT flags
The PCC controller currently enables txdone via IRQ if the PCCT exposes platform capability to generate command completion interrupt, but it leaves txdone_poll unchanged. Make the behaviour explicit: - If ACPI_PCCT_DOORBELL is present, use txdone_irq and disable polling. - Otherwise, disable txdone_irq and fall back to txdone_poll. Configure the PCC mailbox to use interrupt-based completion for PCC types that signal completion via IRQ using TXDONE_BY_IRQ, and fall back to polling for others using TXDONE_BY_POLL. This ensures the PCC driver uses the appropriate completion mechanism according to the PCCT table definition and makes the completion mode unambiguous avoiding mixed signalling when the platform lacks a doorbell flag set. 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>
1 parent a5695de commit 3349f80

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/mailbox/pcc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,8 +791,13 @@ static int pcc_mbox_probe(struct platform_device *pdev)
791791
(unsigned long) pcct_tbl + sizeof(struct acpi_table_pcct));
792792

793793
acpi_pcct_tbl = (struct acpi_table_pcct *) pcct_tbl;
794-
if (acpi_pcct_tbl->flags & ACPI_PCCT_DOORBELL)
794+
if (acpi_pcct_tbl->flags & ACPI_PCCT_DOORBELL) {
795795
pcc_mbox_ctrl->txdone_irq = true;
796+
pcc_mbox_ctrl->txdone_poll = false;
797+
} else {
798+
pcc_mbox_ctrl->txdone_irq = false;
799+
pcc_mbox_ctrl->txdone_poll = true;
800+
}
796801

797802
for (i = 0; i < count; i++) {
798803
struct pcc_chan_info *pchan = chan_info + i;

0 commit comments

Comments
 (0)