Re: [PATCH V4] firmware: arm_scmi: Make scmi core independent of the transport type

From: Jassi Brar
Date: Fri Jan 24 2020 - 13:29:09 EST


On Fri, Jan 24, 2020 at 6:15 AM Peter Hilber
<peter.hilber@xxxxxxxxxxxxxxx> wrote:
....
>
> I would have preferred (to have an option) to use as data passing
> interface to the transport just the struct scmi_xfer. A transport using
> this option would not implement ops (read|write)32 and memcpy_(from|to).
> The transport would also not call scmi_tx_prepare(), but instead take
> data from struct scmi_xfer directly. The transport would use a modified
> scmi_rx_callback() to notify that it updated the struct scmi_xfer. A
> helper to derive the struct scmi_xfer * from the message header would be
> extracted from scmi_rx_callback(). The scmi_xfer_poll_done() would
> become an (optional) transport op.
>
+1
I have pointed out many times the SCMI needs to realize not every
transport layer can conform to its expectations, the scmi_xfer must
have some transport specific element to it. Or there would be
emulation/pretend modes implemented in controller drivers.