TianoCore EDK2 master
Loading...
Searching...
No Matches
ArmScmiClock2Protocol.h
Go to the documentation of this file.
1
12#ifndef ARM_SCMI_CLOCK2_PROTOCOL_H_
13#define ARM_SCMI_CLOCK2_PROTOCOL_H_
14
15#include <Protocol/ArmScmi.h>
17
18#define ARM_SCMI_CLOCK2_PROTOCOL_GUID {\
19 0xb8d8caf2, 0x9e94, 0x462c, { 0xa8, 0x34, 0x6c, 0x99, 0xfc, 0x05, 0xef, 0xcf } \
20 }
21
22extern EFI_GUID gArmScmiClock2ProtocolGuid;
23
24#define SCMI_CLOCK2_PROTOCOL_VERSION 1
25
27
28// Protocol Interface functions.
29
40typedef
44 OUT UINT32 *Version
45 );
46
58typedef
62 OUT UINT32 *TotalClocks
63 );
64
78typedef
82 IN UINT32 ClockId,
83 OUT BOOLEAN *Enabled,
84 OUT CHAR8 *ClockAsciiName
85 );
86
110typedef
114 IN UINT32 ClockId,
115 OUT SCMI_CLOCK_RATE_FORMAT *Format,
116 OUT UINT32 *TotalRates,
117 IN OUT UINT32 *RateArraySize,
118 OUT SCMI_CLOCK_RATE *RateArray
119 );
120
132typedef
134(EFIAPI *SCMI_CLOCK2_RATE_GET)(
136 IN UINT32 ClockId,
137 OUT UINT64 *Rate
138 );
139
150typedef
152(EFIAPI *SCMI_CLOCK2_RATE_SET)(
154 IN UINT32 ClockId,
155 IN UINT64 Rate
156 );
157
169typedef
171(EFIAPI *SCMI_CLOCK2_ENABLE)(
173 IN UINT32 ClockId,
174 IN BOOLEAN Enable
175 );
176
177typedef struct _SCMI_CLOCK2_PROTOCOL {
178 SCMI_CLOCK2_GET_VERSION GetVersion;
179 SCMI_CLOCK2_GET_TOTAL_CLOCKS GetTotalClocks;
180 SCMI_CLOCK2_GET_CLOCK_ATTRIBUTES GetClockAttributes;
181 SCMI_CLOCK2_DESCRIBE_RATES DescribeRates;
182 SCMI_CLOCK2_RATE_GET RateGet;
183 SCMI_CLOCK2_RATE_SET RateSet;
184
185 // Extension to original ClockProtocol, added here so SCMI_CLOCK2_PROTOCOL
186 // can be cast to SCMI_CLOCK_PROTOCOL
187 UINTN Version; // For future expandability
188 SCMI_CLOCK2_ENABLE Enable;
190
191#endif /* ARM_SCMI_CLOCK2_PROTOCOL_H_ */
UINT64 UINTN
EFI_STATUS(EFIAPI * SCMI_CLOCK2_RATE_GET)(IN SCMI_CLOCK2_PROTOCOL *This, IN UINT32 ClockId, OUT UINT64 *Rate)
EFI_STATUS(EFIAPI * SCMI_CLOCK2_DESCRIBE_RATES)(IN SCMI_CLOCK2_PROTOCOL *This, IN UINT32 ClockId, OUT SCMI_CLOCK_RATE_FORMAT *Format, OUT UINT32 *TotalRates, IN OUT UINT32 *RateArraySize, OUT SCMI_CLOCK_RATE *RateArray)
EFI_STATUS(EFIAPI * SCMI_CLOCK2_GET_CLOCK_ATTRIBUTES)(IN SCMI_CLOCK2_PROTOCOL *This, IN UINT32 ClockId, OUT BOOLEAN *Enabled, OUT CHAR8 *ClockAsciiName)
EFI_STATUS(EFIAPI * SCMI_CLOCK2_GET_VERSION)(IN SCMI_CLOCK2_PROTOCOL *This, OUT UINT32 *Version)
EFI_STATUS(EFIAPI * SCMI_CLOCK2_GET_TOTAL_CLOCKS)(IN SCMI_CLOCK2_PROTOCOL *This, OUT UINT32 *TotalClocks)
EFI_STATUS(EFIAPI * SCMI_CLOCK2_RATE_SET)(IN SCMI_CLOCK2_PROTOCOL *This, IN UINT32 ClockId, IN UINT64 Rate)
EFI_STATUS(EFIAPI * SCMI_CLOCK2_ENABLE)(IN SCMI_CLOCK2_PROTOCOL *This, IN UINT32 ClockId, IN BOOLEAN Enable)
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
Definition: Base.h:213