Commit graph

4 commits

Author SHA1 Message Date
Michal Simek
7c3893423d fix(scmi): fix compilation error in scmi base
Fix compilation error when scmi base in enabled.
The following compilation error is visible:
drivers/scmi-msg/base.c: In function 'discover_list_protocols':
include/lib/utils_def.h:70:20: error: comparison of distinct
 pointer types lacks a cast [-Werror]
   70 |         (void)(&_x == &_y);             \
      |                    ^~
drivers/scmi-msg/base.c:154:25: note: in expansion of macro 'MIN'
  154 |                 count = MIN(count - a2p->skip,
 msg->out_size - sizeof(p2a));

Change-Id: I79e60d4bc9c4f6e78a76099a36ebf4fe5212a7d1
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-03-21 13:48:42 +01:00
Etienne Carriere
cad90b569d fix(scmi-msg): base: fix protocol list querying
Corrects the function reporting the SCMI protocols supported by the
platform to not assume 8 protocol IDs at most can be returned. Indeed
the number of protocol IDs returned depends on the SCMI output buffer
size.

Change-Id: Idafbe02d2b25b3bcacaf25977c560c0ac5bb8d62
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2022-05-16 10:32:32 +02:00
Etienne Carriere
d323f0cf00 fix(scmi-msg): base: fix protocol list response size
Corrects the size of the SCMI response payload when querying the list
of the supported protocol. This response payload size depends on the
number of protocols enumerated by the response.

Change-Id: Ib01eb5cec6c6656dfd7d88ccdd5a720c1deee7a3
Reported-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2022-05-16 10:32:18 +02:00
Peng Fan
b473430898 drivers: move scmi-msg out of st
Make the scmi-msg driver reused by others.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Change-Id: I5bc35fd4dab70f45c09b8aab65af4209cf23b124
2021-01-20 11:37:14 +08:00
Renamed from drivers/st/scmi-msg/base.c (Browse further)