Commit graph

12 commits

Author SHA1 Message Date
Jacky Bai
e63819f2bc feat(scmi): add scmi sensor support
LF-4715-1 drivers: scmi-msg: add sensor support

Add scmi sensor support

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I810e270b138bf5486b32df121056bfa5103c129f
2024-02-27 14:29:53 +08:00
XiaoDong Huang
ca9d6edc89 fix(scmi): add parameter for plat_scmi_clock_rates_array
Pass "start_idx" to plat_scmi_clock_rates_array.
This parameter is required to obtain the rate table
a second time.

Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: I97c6751e7d34c839ced8f22bddc39fb534978cc4
2023-08-21 19:46:52 +08:00
Elyes Haouas
1b491eead5 fix(tree): correct some typos
found using codespell (https://github.com/codespell-project/codespell).

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I1bfa797e3460adddeefa916bb68e22beddaf6373
2023-05-09 15:57:12 +01:00
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
Schspa Shi
2355ebff6f fix(scmi): use same type for message_id
The code declares different types of parameters.

static bool message_id_is_supported(unsigned int message_id);
static bool message_id_is_supported(size_t message_id)
{
	...
}

Signed-off-by: Schspa Shi <schspa@gmail.com>
Change-Id: I7435d3b9309ea5fb5f8e3daa7173e09322184422
2022-03-17 12:48:18 +08:00
Yann Gautier
0dc9f52a2a fix(scmi): add missing \n in ERROR message
Correct ERROR message in scmi_process_message().

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I55e337a3904045aa188975f6a7ed3e989678f571
2022-01-28 13:09:17 +01:00
Peng Fan
b3c8fd5d77 fix(drivers/scmi-msg): entry: add weak functions
One platform may not implement all the protocols, to avoid build break
when we not include all the protocols, add weak functions.

Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Change-Id: I1485baa2e8f381cb0eede1a7b93ed10e49934971
2021-07-22 10:27:48 +08:00
Peng Fan
7e4833cdde feat(drivers/scmi-msg): add power domain protocol
Add SCMI power domain protocol, with POWER_STATE_NOTIFY and
POWER_STATE_CHANGE_REQUESTED_NOTIFY not implemented.

Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Change-Id: Ia7c4db57c4c702667f8eaa630c924016e4a8bde0
2021-07-22 10:27:42 +08:00
Peng Fan
0e223c6a9e fix(drivers/scmi-msg): smt: fix build for aarch64
For AARCH64, BIT() will make the number as ULL type, let use BIT_32()
here.

And use %zu for size_t print format.

Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Change-Id: I1dc18d374cd2c6eb83b40b66ed6189dcc6a21728
2021-07-15 11:51:34 +08: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