HomeFreeBSD

scmi: Fix SCMI mailbox polling mechanism

Description

scmi: Fix SCMI mailbox polling mechanism

When the system is cold, the SCMI stack processes commands in polling
mode with the current polling mechanism being a check of the status
register in the mailbox controller to see if there is any pending
doorbell request.

Anyway, the completion interrupt is optional by the SCMI specification
and a system could have been simply designed without it: for this
reason polling on the mailbox controller status registers is not going
to work in all situations.

Moreover even alternative SCMI transports based on shared memory, like
SMC, will not have at all a mailbox controller to poll for.

On the other side, the associated SCMI Shared Memory Transport defines
dedicated channel flags and status bits that can be used by the agent to
explicitly request a polling-based transaction, even if the completion
interrupt was available, and to check afterwards when the platform has
completed its processing on the outstanding command.

Use SCMI/SMT specific mechanism to process transactions in polling mode.

Reviewed by: andrew
Tested on: Arm Morello Board
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D43042

Details

Provenance
cristian.marussi_arm.comAuthored on Dec 7 2023, 7:06 AM
andrewCommitted on Apr 11 2024, 9:58 AM
Reviewer
andrew
Differential Revision
D43042: scmi: Fix SCMI mailbox polling mechanism
Parents
rGd220b1cf02ce: scmi: Extend and refactor SCMI shmem support
Branches
Unknown
Tags
Unknown