Clock management operations via SCMI .
More...
|
| file | clk.h |
| | Header file for the SCMI Clock Protocol.
|
| |
|
| enum | scmi_clock_message {
SCMI_CLK_MSG_PROTOCOL_VERSION = 0x0
, SCMI_CLK_MSG_PROTOCOL_ATTRIBUTES = 0x1
, SCMI_CLK_MSG_PROTOCOL_MESSAGE_ATTRIBUTES = 0x2
, SCMI_CLK_MSG_CLOCK_ATTRIBUTES = 0x3
,
SCMI_CLK_MSG_CLOCK_DESCRIBE_RATES = 0x4
, SCMI_CLK_MSG_CLOCK_RATE_SET = 0x5
, SCMI_CLK_MSG_CLOCK_RATE_GET = 0x6
, SCMI_CLK_MSG_CLOCK_CONFIG_SET = 0x7
,
SCMI_CLK_MSG_CLOCK_NAME_GET = 0x8
, SCMI_CLK_MSG_CLOCK_RATE_NOTIFY = 0x9
, SCMI_CLK_MSG_CLOCK_RATE_CHANGE_REQUESTED_NOTIFY = 0xa
, SCMI_CLK_MSG_CLOCK_CONFIG_GET = 0xb
,
SCMI_CLK_MSG_CLOCK_POSSIBLE_PARENTS_GET = 0xc
, SCMI_CLK_MSG_CLOCK_PARENT_SET = 0xd
, SCMI_CLK_MSG_CLOCK_PARENT_GET = 0xe
, SCMI_CLK_MSG_CLOCK_GET_PERMISSIONS = 0xf
,
SCMI_CLK_MSG_NEGOTIATE_PROTOCOL_VERSION = 0x10
} |
| | Clock protocol command message IDs. More...
|
| |
|
| int | scmi_clock_protocol_attributes (struct scmi_protocol *proto, uint32_t *attributes) |
| | Send the PROTOCOL_ATTRIBUTES command and get its reply.
|
| |
| 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.
|
| |
Clock management operations via SCMI .
◆ SCMI_CLK_ATTRIBUTES_CLK_NUM
| #define SCMI_CLK_ATTRIBUTES_CLK_NUM |
( |
| x | ) |
|
#include <zephyr/drivers/firmware/scmi/clk.h>
Value:
#define GENMASK(h, l)
Create a contiguous bitmask starting at bit position l and ending at position h.
Definition util.h:80
◆ SCMI_CLK_CONFIG_DISABLE_ENABLE_MASK
| #define SCMI_CLK_CONFIG_DISABLE_ENABLE_MASK GENMASK(1, 0) |
◆ SCMI_CLK_CONFIG_ENABLE_DISABLE
| #define SCMI_CLK_CONFIG_ENABLE_DISABLE |
( |
| x | ) |
|
◆ SCMI_CLK_ENABLED
| #define SCMI_CLK_ENABLED |
( |
| attributes | ) |
|
#include <zephyr/drivers/firmware/scmi/clk.h>
Value:
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
get the clock's enabled status based on given attributes
◆ SCMI_CLK_NAME_LEN
| #define SCMI_CLK_NAME_LEN 16 |
◆ SCMI_CLK_PROTOCOL_SUPPORTED_VERSION
| #define SCMI_CLK_PROTOCOL_SUPPORTED_VERSION 0x30000 |
◆ SCMI_CLK_RATE_SET_FLAGS_ASYNC
| #define SCMI_CLK_RATE_SET_FLAGS_ASYNC BIT(0) |
◆ SCMI_CLK_RATE_SET_FLAGS_IGNORE_DELEAYED_RESP
| #define SCMI_CLK_RATE_SET_FLAGS_IGNORE_DELEAYED_RESP BIT(1) |
◆ SCMI_CLK_RATE_SET_FLAGS_ROUNDS_AUTO
| #define SCMI_CLK_RATE_SET_FLAGS_ROUNDS_AUTO BIT(3) |
◆ SCMI_CLK_RATE_SET_FLAGS_ROUNDS_UP_DOWN
| #define SCMI_CLK_RATE_SET_FLAGS_ROUNDS_UP_DOWN BIT(2) |
◆ scmi_clock_message
#include <zephyr/drivers/firmware/scmi/clk.h>
Clock protocol command message IDs.
| Enumerator |
|---|
| SCMI_CLK_MSG_PROTOCOL_VERSION | |
| SCMI_CLK_MSG_PROTOCOL_ATTRIBUTES | |
| SCMI_CLK_MSG_PROTOCOL_MESSAGE_ATTRIBUTES | |
| SCMI_CLK_MSG_CLOCK_ATTRIBUTES | |
| SCMI_CLK_MSG_CLOCK_DESCRIBE_RATES | |
| SCMI_CLK_MSG_CLOCK_RATE_SET | |
| SCMI_CLK_MSG_CLOCK_RATE_GET | |
| SCMI_CLK_MSG_CLOCK_CONFIG_SET | |
| SCMI_CLK_MSG_CLOCK_NAME_GET | |
| SCMI_CLK_MSG_CLOCK_RATE_NOTIFY | |
| SCMI_CLK_MSG_CLOCK_RATE_CHANGE_REQUESTED_NOTIFY | |
| SCMI_CLK_MSG_CLOCK_CONFIG_GET | |
| SCMI_CLK_MSG_CLOCK_POSSIBLE_PARENTS_GET | |
| SCMI_CLK_MSG_CLOCK_PARENT_SET | |
| SCMI_CLK_MSG_CLOCK_PARENT_GET | |
| SCMI_CLK_MSG_CLOCK_GET_PERMISSIONS | |
| SCMI_CLK_MSG_NEGOTIATE_PROTOCOL_VERSION | |
◆ scmi_clock_attributes()
| 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.
- Parameters
-
| 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 |
- Return values
-
| 0 | if successful |
| negative | errno if failure |
◆ scmi_clock_config_set()
#include <zephyr/drivers/firmware/scmi/clk.h>
Send the CLOCK_CONFIG_SET command and get its reply.
- Parameters
-
| proto | pointer to SCMI clock protocol data |
| cfg | pointer to structure containing configuration to be set |
- Return values
-
| 0 | if successful |
| negative | errno if failure |
◆ scmi_clock_parent_get()
#include <zephyr/drivers/firmware/scmi/clk.h>
Query the parent of a clock.
- Parameters
-
| 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 |
- Return values
-
| 0 | if successful |
| negative | errno if failure |
◆ scmi_clock_parent_set()
#include <zephyr/drivers/firmware/scmi/clk.h>
Send the CLOCK_PARENT_SET command and get its reply.
- Parameters
-
| 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 |
- Return values
-
| 0 | if successful |
| negative | errno if failure |
◆ scmi_clock_protocol_attributes()
#include <zephyr/drivers/firmware/scmi/clk.h>
Send the PROTOCOL_ATTRIBUTES command and get its reply.
- Parameters
-
| proto | pointer to SCMI clock protocol data |
| attributes | pointer to attributes to be set via this command |
- Return values
-
| 0 | if successful |
| negative | errno if failure |
◆ scmi_clock_rate_get()
#include <zephyr/drivers/firmware/scmi/clk.h>
Query the rate of a clock.
- Parameters
-
| 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 |
- Return values
-
| 0 | if successful |
| negative | errno if failure |
◆ scmi_clock_rate_set()
#include <zephyr/drivers/firmware/scmi/clk.h>
Send the CLOCK_RATE_SET command and get its reply.
- Parameters
-
| proto | pointer to SCMI clock protocol data |
| cfg | pointer to structure containing configuration to be set |
- Return values
-
| 0 | if successful |
| negative | errno if failure |