diff options
author | Etienne Carriere <etienne.carriere@linaro.org> | 2022-05-31 19:09:18 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-06-23 20:12:55 +0300 |
commit | 8bcb1b4898be4849b711687fd140b43074b648da (patch) | |
tree | a5e8b5f18efae6704faeccff4104844b1ef7a5ca /include | |
parent | 5d8eb4ce33b4620264461a4ab00abd293f4537d5 (diff) | |
download | u-boot-8bcb1b4898be4849b711687fd140b43074b648da.tar.xz |
firmware: scmi: prepare scmi uclass API to multi-channel
Changes SCMI driver API function devm_scmi_process_msg() to add
an SCMI channel reference argument for when SCMI agent supports
SCMI protocol specific channels. First argument of devm_scmi_process_msg()
is also change to point to the caller SCMI protocol device rather
than its parent device (the SCMI agent device).
The argument is a pointer to opaque struct scmi_channel known from
the SCMI transport drivers. It is currently unused and caller a pass
NULL value. A later change will enable such support once SCMI protocol
drivers have means to get the channel reference during initialization.
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Sean Anderson <seanga2@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/scmi_agent-uclass.h | 2 | ||||
-rw-r--r-- | include/scmi_agent.h | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/include/scmi_agent-uclass.h b/include/scmi_agent-uclass.h index a501d1b482..861ac6d110 100644 --- a/include/scmi_agent-uclass.h +++ b/include/scmi_agent-uclass.h @@ -15,7 +15,7 @@ struct scmi_agent_ops { /* * process_msg - Request transport to get the SCMI message processed * - * @agent: Agent using the transport + * @dev: SCMI protocol device using the transport * @msg: SCMI message to be transmitted */ int (*process_msg)(struct udevice *dev, struct scmi_msg *msg); diff --git a/include/scmi_agent.h b/include/scmi_agent.h index 18bcd48a9d..f4d85cae77 100644 --- a/include/scmi_agent.h +++ b/include/scmi_agent.h @@ -13,6 +13,7 @@ #include <asm/types.h> struct udevice; +struct scmi_channel; /* * struct scmi_msg - Context of a SCMI message sent and the response received @@ -52,10 +53,12 @@ struct scmi_msg { * On return, scmi_msg::out_msg_sz stores the response payload size. * * @dev: SCMI device + * @channel: Communication channel for the device * @msg: Message structure reference * Return: 0 on success and a negative errno on failure */ -int devm_scmi_process_msg(struct udevice *dev, struct scmi_msg *msg); +int devm_scmi_process_msg(struct udevice *dev, struct scmi_channel *channel, + struct scmi_msg *msg); /** * scmi_to_linux_errno() - Convert an SCMI error code into a Linux errno code |