|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Clock management operations via SCMI. More...
Files | |
| file | clk.h |
| Header file for the SCMI Clock Protocol. | |
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) |
| #define | SCMI_CLK_CONFIG_ENABLE_DISABLE(x) |
| #define | SCMI_CLK_ATTRIBUTES_CLK_NUM(x) |
| #define | SCMI_CLK_RATE_SET_FLAGS_ASYNC BIT(0) |
| #define | SCMI_CLK_RATE_SET_FLAGS_IGNORE_DELEAYED_RESP BIT(1) |
| #define | SCMI_CLK_RATE_SET_FLAGS_ROUNDS_UP_DOWN BIT(2) |
| #define | SCMI_CLK_RATE_SET_FLAGS_ROUNDS_AUTO BIT(3) |
| #define | SCMI_CLK_PROTOCOL_SUPPORTED_VERSION 0x30000 |
| #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. | |
Clock management operations via SCMI.
| #define SCMI_CLK_ATTRIBUTES_CLK_NUM | ( | x | ) |
#include <zephyr/drivers/firmware/scmi/clk.h>
| #define SCMI_CLK_CONFIG_DISABLE_ENABLE_MASK GENMASK(1, 0) |
#include <zephyr/drivers/firmware/scmi/clk.h>
| #define SCMI_CLK_CONFIG_ENABLE_DISABLE | ( | x | ) |
#include <zephyr/drivers/firmware/scmi/clk.h>
| #define SCMI_CLK_ENABLED | ( | attributes | ) |
#include <zephyr/drivers/firmware/scmi/clk.h>
get the clock's enabled status based on given attributes
| #define SCMI_CLK_HAS_RESTRICTIONS | ( | attributes | ) |
#include <zephyr/drivers/firmware/scmi/clk.h>
check if a clock has restrictions based on given attributes
| #define SCMI_CLK_NAME_LEN 16 |
#include <zephyr/drivers/firmware/scmi/clk.h>
clock name length (short version)
| #define SCMI_CLK_PROTOCOL_SUPPORTED_VERSION 0x30000 |
#include <zephyr/drivers/firmware/scmi/clk.h>
| #define SCMI_CLK_RATE_SET_FLAGS_ASYNC BIT(0) |
#include <zephyr/drivers/firmware/scmi/clk.h>
| #define SCMI_CLK_RATE_SET_FLAGS_IGNORE_DELEAYED_RESP BIT(1) |
#include <zephyr/drivers/firmware/scmi/clk.h>
| #define SCMI_CLK_RATE_SET_FLAGS_ROUNDS_AUTO BIT(3) |
#include <zephyr/drivers/firmware/scmi/clk.h>
| #define SCMI_CLK_RATE_SET_FLAGS_ROUNDS_UP_DOWN BIT(2) |
#include <zephyr/drivers/firmware/scmi/clk.h>
| #define SCMI_CLK_STATE_CONTROL_ALLOWED | ( | permissions | ) |
#include <zephyr/drivers/firmware/scmi/clk.h>
check if clock allows gating/ungating based on its permissions
| int scmi_clock_attributes | ( | struct scmi_protocol * | proto, |
| uint32_t | clk_id, | ||
| struct scmi_clock_attributes * | attributes ) |
#include <zephyr/drivers/firmware/scmi/clk.h>
Send the CLOCK_ATTRIBUTES command and get its reply.
| proto | pointer to SCMI clock protocol data |
| clk_id | ID of the clock for which the query is done |
| attributes | clock attributes returned by the command |
| 0 | if successful |
| negative | errno if failure |
| int scmi_clock_config_set | ( | struct scmi_protocol * | proto, |
| struct scmi_clock_config * | cfg ) |
#include <zephyr/drivers/firmware/scmi/clk.h>
Send the CLOCK_CONFIG_SET command and get its reply.
| proto | pointer to SCMI clock protocol data |
| cfg | pointer to structure containing configuration to be set |
| 0 | if successful |
| negative | errno if failure |
| int scmi_clock_get_permissions | ( | struct scmi_protocol * | proto, |
| uint32_t | clk_id, | ||
| uint32_t * | permissions ) |
#include <zephyr/drivers/firmware/scmi/clk.h>
Send the CLOCK_GET_PERMISSIONS command and get its reply.
| proto | pointer to SCMI clock protocol data |
| clk_id | ID of the clock for which the query is done |
| permissions | clock permissions returned by the command |
| 0 | if successful |
| negative | errno if failure |
| int scmi_clock_parent_get | ( | struct scmi_protocol * | proto, |
| uint32_t | clk_id, | ||
| uint32_t * | parent_id ) |
#include <zephyr/drivers/firmware/scmi/clk.h>
Query the parent of a clock.
| proto | pointer to SCMI clock protocol data |
| clk_id | ID of the clock for which the query is done |
| parent_id | pointer to be set via this command |
| 0 | if successful |
| negative | errno if failure |
| int scmi_clock_parent_set | ( | struct scmi_protocol * | proto, |
| uint32_t | clk_id, | ||
| uint32_t | parent_id ) |
#include <zephyr/drivers/firmware/scmi/clk.h>
Send the CLOCK_PARENT_SET command and get its reply.
| proto | pointer to SCMI clock protocol data |
| clk_id | ID of the clock for which the query is done |
| parent_id | to be set via this command to be set |
| 0 | if successful |
| negative | errno if failure |
| int scmi_clock_rate_get | ( | struct scmi_protocol * | proto, |
| uint32_t | clk_id, | ||
| uint32_t * | rate ) |
#include <zephyr/drivers/firmware/scmi/clk.h>
Query the rate of a clock.
| proto | pointer to SCMI clock protocol data |
| clk_id | ID of the clock for which the query is done |
| rate | pointer to rate to be set via this command |
| 0 | if successful |
| negative | errno if failure |
| int scmi_clock_rate_set | ( | struct scmi_protocol * | proto, |
| struct scmi_clock_rate_config * | cfg ) |
#include <zephyr/drivers/firmware/scmi/clk.h>
Send the CLOCK_RATE_SET command and get its reply.
| proto | pointer to SCMI clock protocol data |
| cfg | pointer to structure containing configuration to be set |
| 0 | if successful |
| negative | errno if failure |