aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2023-10-11 19:06:55 +0900
committerTom Rini <trini@konsulko.com>2023-10-13 16:59:23 -0400
commit689204be9744db24fc8031229946f045fae02c07 (patch)
treebcab78f9856610c852191e3f5874a83fe957c1d6 /include
parentc6230cd8427c906baa52dbff5b95027ef58e6048 (diff)
downloadu-boot-689204be9744db24fc8031229946f045fae02c07.zip
u-boot-689204be9744db24fc8031229946f045fae02c07.tar.gz
u-boot-689204be9744db24fc8031229946f045fae02c07.tar.bz2
firmware: scmi: use a protocol's own channel if assigned
SCMI specification allows any protocol to have its own channel for the transport. While the current SCMI driver may assign its channel from a device tree, the core function, devm_scmi_process_msg(), doesn't use a protocol's channel, but always use an agent's channel. With this commit, devm_scmi_process_msg() tries to find and use a protocol's channel. If it doesn't exist, use an agent's. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/scmi_agent-uclass.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/scmi_agent-uclass.h b/include/scmi_agent-uclass.h
index b1c9353..eee46c8 100644
--- a/include/scmi_agent-uclass.h
+++ b/include/scmi_agent-uclass.h
@@ -16,16 +16,18 @@ struct scmi_agent_ops {
/*
* of_get_channel - Get SCMI channel from SCMI agent device tree node
*
- * @dev: SCMI protocol device using the transport
+ * @dev: SCMI agent device using the transport
+ * @protocol: SCMI protocol device using the transport
* @channel: Output reference to SCMI channel upon success
* Return 0 upon success and a negative errno on failure
*/
- int (*of_get_channel)(struct udevice *dev, struct scmi_channel **channel);
+ int (*of_get_channel)(struct udevice *dev, struct udevice *protocol,
+ struct scmi_channel **channel);
/*
* process_msg - Request transport to get the SCMI message processed
*
- * @dev: SCMI protocol device using the transport
+ * @dev: SCMI agent device using the transport
* @msg: SCMI message to be transmitted
*/
int (*process_msg)(struct udevice *dev, struct scmi_channel *channel,