AM62L FreeRTOS SDK  11.00.00
scmi_clock.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2025 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
49 #ifndef SCMI_CLOCK_H
50 #define SCMI_CLOCK_H
51 
52 /* ========================================================================== */
53 /* Include Files */
54 /* ========================================================================== */
55 
56 #include <stdint.h>
58 
59 /* ========================================================================== */
60 /* Macros & Typedefs */
61 /* ========================================================================== */
62 
63 /* None */
64 
65 /* ========================================================================== */
66 /* Structure Declarations */
67 /* ========================================================================== */
68 
69 /* None */
70 
71 /* ========================================================================== */
72 /* Function Declarations */
73 /* ========================================================================== */
84  uint32_t *numClocks);
85 
96 int32_t SCMI_clockGetAttrs(SCMI_Handle handle, uint32_t clockId,
97  uint32_t *attributes, uint8_t *name);
98 
108 int32_t SCMI_clockConfigSet(SCMI_Handle handle, uint32_t clockId,
109  uint32_t clockState);
110 
120 int32_t SCMI_clockConfigGet(SCMI_Handle handle, uint32_t clockId,
121  uint32_t *clockState);
122 
132 int32_t SCMI_clockNameGet(SCMI_Handle handle, uint32_t clockId,
133  uint8_t *name);
134 
144 int32_t SCMI_clockRateGet(SCMI_Handle handle, uint32_t clockId,
145  uint64_t *clockRate);
146 
156 int32_t SCMI_clockRateSet(SCMI_Handle handle, uint32_t clockId,
157  uint64_t clockRate);
158 
168 int32_t SCMI_clockParentSet(SCMI_Handle handle, uint32_t clockId,
169  uint32_t parentId);
170 
180 int32_t SCMI_clockParentGet(SCMI_Handle handle, uint32_t clockId,
181  uint32_t *parentId);
182 
193 int32_t SCMI_clockGetPossibleParents(SCMI_Handle handle, uint32_t clockId,
194  uint32_t *numPosParents,
195  uint32_t *possibleParents);
196 
205 
206 #endif /* SCMI_CLOCK_H */
207 
SCMI_clockParentGet
int32_t SCMI_clockParentGet(SCMI_Handle handle, uint32_t clockId, uint32_t *parentId)
API to get parent for a clock.
SCMI_clockGetAttrs
int32_t SCMI_clockGetAttrs(SCMI_Handle handle, uint32_t clockId, uint32_t *attributes, uint8_t *name)
API to get clock attributes for a clock Id.
SCMI_Handle
void * SCMI_Handle
A handle that is returned from a SCMI_open() call.
Definition: scp/scmi/v0/scmi.h:68
SCMI_clockConfigSet
int32_t SCMI_clockConfigSet(SCMI_Handle handle, uint32_t clockId, uint32_t clockState)
API to set clock state for a clock to enable or disable state.
SCMI_clockProtocolInit
int32_t SCMI_clockProtocolInit(SCMI_Handle handle)
API to initialise clock protocol.
SCMI_clockNameGet
int32_t SCMI_clockNameGet(SCMI_Handle handle, uint32_t clockId, uint8_t *name)
API to get clock's extended name.
SCMI_clockGetProtocolAttrs
int32_t SCMI_clockGetProtocolAttrs(SCMI_Handle handle, uint32_t *numClocks)
API to get clock protocol attributes using clockSCMI protocol.
SCMI_clockRateGet
int32_t SCMI_clockRateGet(SCMI_Handle handle, uint32_t clockId, uint64_t *clockRate)
API to get clock rate for a clock.
scmi.h
SCMI Driver API/interface file. This is SCMI top level include for applications.
SCMI_clockGetPossibleParents
int32_t SCMI_clockGetPossibleParents(SCMI_Handle handle, uint32_t clockId, uint32_t *numPosParents, uint32_t *possibleParents)
API to get possible parents for a clock.
SCMI_clockConfigGet
int32_t SCMI_clockConfigGet(SCMI_Handle handle, uint32_t clockId, uint32_t *clockState)
API to get clock state for a clock.
SCMI_clockParentSet
int32_t SCMI_clockParentSet(SCMI_Handle handle, uint32_t clockId, uint32_t parentId)
API to set parent for a clock.
SCMI_clockRateSet
int32_t SCMI_clockRateSet(SCMI_Handle handle, uint32_t clockId, uint64_t clockRate)
API to set clock rate for a clock.