summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/scmi_agent.h2
-rw-r--r--include/scmi_protocols.h43
2 files changed, 44 insertions, 1 deletions
diff --git a/include/scmi_agent.h b/include/scmi_agent.h
index 5015c06be99..18bcd48a9d4 100644
--- a/include/scmi_agent.h
+++ b/include/scmi_agent.h
@@ -51,7 +51,7 @@ struct scmi_msg {
* Caller sets scmi_msg::out_msg_sz to the output message buffer size.
* On return, scmi_msg::out_msg_sz stores the response payload size.
*
- * @dev: SCMI agent device
+ * @dev: SCMI device
* @msg: Message structure reference
* Return: 0 on success and a negative errno on failure
*/
diff --git a/include/scmi_protocols.h b/include/scmi_protocols.h
index ef26e721762..a220cb2a91a 100644
--- a/include/scmi_protocols.h
+++ b/include/scmi_protocols.h
@@ -41,21 +41,64 @@ enum scmi_status_code {
};
/*
+ * Generic message IDs
+ */
+enum scmi_discovery_id {
+ SCMI_PROTOCOL_VERSION = 0x0,
+ SCMI_PROTOCOL_ATTRIBUTES = 0x1,
+ SCMI_PROTOCOL_MESSAGE_ATTRIBUTES = 0x2,
+};
+
+/*
* SCMI Clock Protocol
*/
enum scmi_clock_message_id {
+ SCMI_CLOCK_ATTRIBUTES = 0x3,
SCMI_CLOCK_RATE_SET = 0x5,
SCMI_CLOCK_RATE_GET = 0x6,
SCMI_CLOCK_CONFIG_SET = 0x7,
};
+#define SCMI_CLK_PROTO_ATTR_COUNT_MASK GENMASK(15, 0)
#define SCMI_CLK_RATE_ASYNC_NOTIFY BIT(0)
#define SCMI_CLK_RATE_ASYNC_NORESP (BIT(0) | BIT(1))
#define SCMI_CLK_RATE_ROUND_DOWN 0
#define SCMI_CLK_RATE_ROUND_UP BIT(2)
#define SCMI_CLK_RATE_ROUND_CLOSEST BIT(3)
+#define SCMI_CLOCK_NAME_LENGTH_MAX 16
+
+/**
+ * struct scmi_clk_get_nb_out - Response for SCMI_PROTOCOL_ATTRIBUTES command
+ * @status: SCMI command status
+ * @attributes: Attributes of the clock protocol, mainly number of clocks exposed
+ */
+struct scmi_clk_protocol_attr_out {
+ s32 status;
+ u32 attributes;
+};
+
+/**
+ * struct scmi_clk_attribute_in - Message payload for SCMI_CLOCK_ATTRIBUTES command
+ * @clock_id: SCMI clock ID
+ */
+struct scmi_clk_attribute_in {
+ u32 clock_id;
+};
+
+/**
+ * struct scmi_clk_get_nb_out - Response payload for SCMI_CLOCK_ATTRIBUTES command
+ * @status: SCMI command status
+ * @attributes: clock attributes
+ * @clock_name: name of the clock
+ */
+struct scmi_clk_attribute_out {
+ s32 status;
+ u32 attributes;
+ char clock_name[SCMI_CLOCK_NAME_LENGTH_MAX];
+};
+
/**
* struct scmi_clk_state_in - Message payload for CLOCK_CONFIG_SET command
* @clock_id: SCMI clock ID