Page MenuHomeFreeBSD

scmi: Introduce a new SCMI API and port CLK SCMI driver to it
ClosedPublic

Authored by cristian.marussi_arm.com on Dec 13 2023, 6:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 2:40 AM
Unknown Object (File)
Sun, Apr 21, 8:00 AM
Unknown Object (File)
Thu, Apr 11, 12:12 PM
Unknown Object (File)
Mar 8 2024, 4:08 PM
Unknown Object (File)
Feb 15 2024, 5:34 PM
Unknown Object (File)
Feb 10 2024, 9:40 PM
Unknown Object (File)
Feb 3 2024, 8:19 AM
Unknown Object (File)
Feb 1 2024, 4:38 PM
Subscribers

Details

Summary

Expose new scmi_buf_get/put API methods to build and send messages;
command request descriptors are now pre-allocated when the SCMI core is
initialized and kept in a free list, instead of being allocated on the
stack of the caller of the SCMI request.

Dynamically allocated descriptors enable the SCMI core to keep around
and track outstanding transactions for as long as needed, outliving the
lifetime of the caller stack: this allows tracking of late or missing
replies and it will be needed when adding support for SCMI transports
that allows for more messages to be inflight concurrently.

Move the existing CLK SCMI driver to the new API.

Tested on: ARM Morello Board
Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/dev/firmware/arm/scmi.c
221–222

No need for this check

228–229

No need for this check

sys/dev/firmware/arm/scmi_clk.c
254–267

Is this needed? error is already non-zero.

Removed needless malloc checks

malloc M_WAITOK xannot fail so removed a few checks on that and consequently
simplified the error paths of scmi_clk_attr() and scmi_reqs_poll_allocate()

This revision is now accepted and ready to land.Mar 5 2024, 2:34 PM

Reworked to rebase cleanly on other series changes

Needed to be rebased after I shuffled around the sc->trs initialization.

This revision now requires review to proceed.Mar 7 2024, 5:43 PM
This revision is now accepted and ready to land.Mar 8 2024, 2:48 PM