|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Header file for the SCMI Clock Protocol. More...
#include <zephyr/drivers/firmware/scmi/protocol.h>Go to the source code of this file.
Data Structures | |
| struct | scmi_clock_config |
| Describes the parameters for the CLOCK_CONFIG_SET command. More... | |
| struct | scmi_clock_rate_config |
| Describes the parameters for the CLOCK_RATE_SET command. More... | |
| struct | scmi_clock_attributes |
| Describes the content of the CLOCK_ATTRIBUTES command reply. More... | |
Macros | |
| #define | SCMI_CLK_CONFIG_DISABLE_ENABLE_MASK GENMASK(1, 0) |
| Mask of the enable/disable field in a CLOCK_CONFIG_SET attributes word. | |
| #define | SCMI_CLK_CONFIG_ENABLE_DISABLE(x) |
Extract the enable/disable field from a CLOCK_CONFIG_SET value x. | |
| #define | SCMI_CLK_ATTRIBUTES_CLK_NUM(x) |
Extract the number of clocks from a PROTOCOL_ATTRIBUTES reply x. | |
| #define | SCMI_CLK_RATE_SET_FLAGS_ASYNC BIT(0) |
| CLOCK_RATE_SET flag: perform the rate change asynchronously. | |
| #define | SCMI_CLK_RATE_SET_FLAGS_IGNORE_DELEAYED_RESP BIT(1) |
| CLOCK_RATE_SET flag: do not send a delayed response for async requests. | |
| #define | SCMI_CLK_RATE_SET_FLAGS_ROUNDS_UP_DOWN BIT(2) |
| CLOCK_RATE_SET flag: round the rate up (set) or down (cleared). | |
| #define | SCMI_CLK_RATE_SET_FLAGS_ROUNDS_AUTO BIT(3) |
| CLOCK_RATE_SET flag: round the rate to the closest supported value. | |
| #define | SCMI_CLK_PROTOCOL_SUPPORTED_VERSION 0x30000 |
| Version of the SCMI clock protocol supported by this driver. | |
| #define | SCMI_PROTO_VER_MAJOR(v) |
| Clock name length (short version). | |
| #define | SCMI_PROTO_VER_MINOR(v) |
| Extract minor version from SCMI protocol version. | |
| #define | SCMI_CLK_NAME_LEN 16 |
| clock name length (short version) | |
| #define | SCMI_CLK_ENABLED(attributes) |
| Get the clock's enabled status based on given attributes. | |
| #define | SCMI_CLK_HAS_RESTRICTIONS(attributes) |
| Check if a clock has restrictions based on given attributes. | |
| #define | SCMI_CLK_STATE_CONTROL_ALLOWED(permissions) |
| Check if clock allows gating/ungating based on its permissions. | |
Functions | |
| int | scmi_clock_config_set (struct scmi_protocol *proto, struct scmi_clock_config *cfg) |
| Send the CLOCK_CONFIG_SET command and get its reply. | |
| int | scmi_clock_rate_get (struct scmi_protocol *proto, uint32_t clk_id, uint32_t *rate) |
| Query the rate of a clock. | |
| int | scmi_clock_rate_set (struct scmi_protocol *proto, struct scmi_clock_rate_config *cfg) |
| Send the CLOCK_RATE_SET command and get its reply. | |
| int | scmi_clock_parent_get (struct scmi_protocol *proto, uint32_t clk_id, uint32_t *parent_id) |
| Query the parent of a clock. | |
| int | scmi_clock_parent_set (struct scmi_protocol *proto, uint32_t clk_id, uint32_t parent_id) |
| Send the CLOCK_PARENT_SET command and get its reply. | |
| int | scmi_clock_attributes (struct scmi_protocol *proto, uint32_t clk_id, struct scmi_clock_attributes *attributes) |
| Send the CLOCK_ATTRIBUTES command and get its reply. | |
| int | scmi_clock_get_permissions (struct scmi_protocol *proto, uint32_t clk_id, uint32_t *permissions) |
| Send the CLOCK_GET_PERMISSIONS command and get its reply. | |
Header file for the SCMI Clock Protocol.