Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
clk.h
Go to the documentation of this file.
1/*
2 * Copyright 2024 NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12#ifndef _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_CLK_H_
13#define _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_CLK_H_
14
16
17#define SCMI_CLK_CONFIG_DISABLE_ENABLE_MASK GENMASK(1, 0)
18#define SCMI_CLK_CONFIG_ENABLE_DISABLE(x)\
19 ((uint32_t)(x) & SCMI_CLK_CONFIG_DISABLE_ENABLE_MASK)
20
21#define SCMI_CLK_ATTRIBUTES_CLK_NUM(x) ((x) & GENMASK(15, 0))
22
34
57
69 uint32_t *attributes);
70
82 struct scmi_clock_config *cfg);
94 uint32_t clk_id, uint32_t *rate);
95
96#endif /* _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_CLK_H_ */
scmi_clock_message
Clock protocol command message IDs.
Definition clk.h:38
@ SCMI_CLK_MSG_CLOCK_NAME_GET
Definition clk.h:47
@ SCMI_CLK_MSG_CLOCK_CONFIG_GET
Definition clk.h:50
@ SCMI_CLK_MSG_CLOCK_RATE_CHANGE_REQUESTED_NOTIFY
Definition clk.h:49
@ SCMI_CLK_MSG_PROTOCOL_ATTRIBUTES
Definition clk.h:40
@ SCMI_CLK_MSG_CLOCK_ATTRIBUTES
Definition clk.h:42
@ SCMI_CLK_MSG_CLOCK_DESCRIBE_RATES
Definition clk.h:43
@ SCMI_CLK_MSG_NEGOTIATE_PROTOCOL_VERSION
Definition clk.h:55
@ SCMI_CLK_MSG_CLOCK_POSSIBLE_PARENTS_GET
Definition clk.h:51
@ SCMI_CLK_MSG_CLOCK_RATE_SET
Definition clk.h:44
@ SCMI_CLK_MSG_CLOCK_RATE_GET
Definition clk.h:45
@ SCMI_CLK_MSG_CLOCK_CONFIG_SET
Definition clk.h:46
@ SCMI_CLK_MSG_CLOCK_PARENT_GET
Definition clk.h:53
@ SCMI_CLK_MSG_CLOCK_RATE_NOTIFY
Definition clk.h:48
@ SCMI_CLK_MSG_PROTOCOL_VERSION
Definition clk.h:39
@ SCMI_CLK_MSG_CLOCK_PARENT_SET
Definition clk.h:52
@ SCMI_CLK_MSG_CLOCK_GET_PERMISSIONS
Definition clk.h:54
@ SCMI_CLK_MSG_PROTOCOL_MESSAGE_ATTRIBUTES
Definition clk.h:41
int scmi_clock_protocol_attributes(struct scmi_protocol *proto, uint32_t *attributes)
Send the PROTOCOL_ATTRIBUTES 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_config_set(struct scmi_protocol *proto, struct scmi_clock_config *cfg)
Send the CLOCK_CONFIG_SET command and get its reply.
SCMI protocol generic functions and structures.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Describes the parameters for the CLOCK_CONFIG_SET command.
Definition clk.h:29
uint32_t clk_id
Definition clk.h:30
uint32_t extended_cfg_val
Definition clk.h:32
uint32_t attributes
Definition clk.h:31
SCMI protocol structure.
Definition protocol.h:74