mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
firmware: scmi: framework for installing additional protocols
This framework allows SCMI protocols to be installed and bound to the agent so that the agent can manage and utilize them later. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
This commit is contained in:
committed by
Tom Rini
parent
bb8079ae38
commit
55de62baa1
@@ -5,10 +5,23 @@
|
||||
#ifndef _SCMI_AGENT_UCLASS_H
|
||||
#define _SCMI_AGENT_UCLASS_H
|
||||
|
||||
struct udevice;
|
||||
#include <dm/device.h>
|
||||
|
||||
struct scmi_msg;
|
||||
struct scmi_channel;
|
||||
|
||||
/**
|
||||
* struct scmi_agent_priv - private data maintained by agent instance
|
||||
* @clock_dev: SCMI clock protocol device
|
||||
* @resetdom_dev: SCMI reset domain protocol device
|
||||
* @voltagedom_dev: SCMI voltage domain protocol device
|
||||
*/
|
||||
struct scmi_agent_priv {
|
||||
struct udevice *clock_dev;
|
||||
struct udevice *resetdom_dev;
|
||||
struct udevice *voltagedom_dev;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct scmi_transport_ops - The functions that a SCMI transport layer must implement.
|
||||
*/
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#ifndef SCMI_AGENT_H
|
||||
#define SCMI_AGENT_H
|
||||
|
||||
#include <scmi_protocols.h>
|
||||
#include <asm/types.h>
|
||||
|
||||
struct udevice;
|
||||
@@ -74,6 +75,19 @@ int devm_scmi_of_get_channel(struct udevice *dev);
|
||||
*/
|
||||
int devm_scmi_process_msg(struct udevice *dev, struct scmi_msg *msg);
|
||||
|
||||
/**
|
||||
* scmi_get_protocol() - get protocol instance
|
||||
*
|
||||
* @dev: SCMI agent device
|
||||
* @id: SCMI protocol ID
|
||||
*
|
||||
* Obtain the device instance for given protocol ID, @id.
|
||||
*
|
||||
* Return: Pointer to the device if found, null otherwise
|
||||
*/
|
||||
struct udevice *scmi_get_protocol(struct udevice *dev,
|
||||
enum scmi_std_protocol id);
|
||||
|
||||
/**
|
||||
* scmi_to_linux_errno() - Convert an SCMI error code into a Linux errno code
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user