Re: [PATCH 05/22] firmware: arm_scmi: Dynamically allocate protocols array

From: Sudeep Holla
Date: Thu Apr 28 2022 - 06:27:52 EST


On Wed, Mar 30, 2022 at 04:05:34PM +0100, Cristian Marussi wrote:
> Move away from a statically allocated array for holding the current set of
> protocols implemented by the platform in favour of allocating it
> dynamically based on the number of protocols effectively advertised by the
> platform via BASE protocol exchanges.
>
> While at that, rectify the BASE_DISCOVER_LIST_PROTOCOLS loop iterations to
> terminate only when a number of protocols equal to the advertised ones has
> been received, instead of looping till the platform returns no more
> protocols descriptors: this new behaviour is better compliant with the
> specification and it has been tested to work equally well against an SCMI
> stack running on top of an official SCP firmware on a JUNO board.
>

Nice, no idea why I forgot that we have num_protocols from the another
command when I originally wrote this. I may be carried away with the way
OPP or even the clock rate list works I guess.

--
Regards,
Sudeep