TianoCore EDK2
master
Loading...
Searching...
No Matches
ArmScmiClockProtocolPrivate.h
Go to the documentation of this file.
1
12
#ifndef ARM_SCMI_CLOCK_PROTOCOL_PRIVATE_H_
13
#define ARM_SCMI_CLOCK_PROTOCOL_PRIVATE_H_
14
15
#pragma pack(1)
16
17
// Clock rate in two 32bit words.
18
typedef
struct
{
19
UINT32 Low;
20
UINT32 High;
21
}
CLOCK_RATE_DWORD
;
22
23
// Format of the returned rate array. Linear or Non-linear,.RatesFlag Bit[12]
24
#define RATE_FORMAT_SHIFT 12
25
#define RATE_FORMAT_MASK 0x0001
26
#define RATE_FORMAT(RatesFlags) ((RatesFlags >> RATE_FORMAT_SHIFT) \
27
& RATE_FORMAT_MASK)
28
29
// Number of remaining rates after a call to the SCP, RatesFlag Bits[31:16]
30
#define NUM_REMAIN_RATES_SHIFT 16
31
#define NUM_REMAIN_RATES(RatesFlags) ((RatesFlags >> NUM_REMAIN_RATES_SHIFT))
32
33
// Number of rates that are returned by a call.to the SCP, RatesFlag Bits[11:0]
34
#define NUM_RATES_MASK 0x0FFF
35
#define NUM_RATES(RatesFlags) (RatesFlags & NUM_RATES_MASK)
36
37
// Return values for the CLOCK_DESCRIBER_RATE command.
38
typedef
struct
{
39
UINT32 NumRatesFlags;
40
41
// NOTE: Since EDK2 does not allow flexible array member [] we declare
42
// here array of 1 element length. However below is used as a variable
43
// length array.
44
CLOCK_RATE_DWORD
Rates[1];
45
}
CLOCK_DESCRIBE_RATES
;
46
47
#define CLOCK_SET_DEFAULT_FLAGS 0
48
49
// Message parameters for CLOCK_RATE_SET command.
50
typedef
struct
{
51
UINT32 Flags;
52
UINT32 ClockId;
53
CLOCK_RATE_DWORD
Rate;
54
}
CLOCK_RATE_SET_ATTRIBUTES
;
55
56
// Message parameters for CLOCK_CONFIG_SET command.
57
typedef
struct
{
58
UINT32 ClockId;
59
UINT32 Attributes;
60
}
CLOCK_CONFIG_SET_ATTRIBUTES
;
61
62
// if ClockAttr Bit[0] is set then clock device is enabled.
63
#define CLOCK_ENABLE_MASK 0x1
64
#define CLOCK_ENABLED(ClockAttr) ((ClockAttr & CLOCK_ENABLE_MASK) == 1)
65
66
typedef
struct
{
67
UINT32 Attributes;
68
UINT8 ClockName[SCMI_MAX_STR_LEN];
69
}
CLOCK_ATTRIBUTES
;
70
71
#pragma pack()
72
79
EFI_STATUS
80
ScmiClockProtocolInit
(
81
IN
EFI_HANDLE
*Handle
82
);
83
84
#endif
/* ARM_SCMI_CLOCK_PROTOCOL_PRIVATE_H_ */
ScmiClockProtocolInit
EFI_STATUS ScmiClockProtocolInit(IN EFI_HANDLE *Handle)
Definition:
ScmiClockProtocol.c:461
IN
#define IN
Definition:
Base.h:279
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
EFI_HANDLE
VOID * EFI_HANDLE
Definition:
UefiBaseType.h:33
CLOCK_ATTRIBUTES
Definition:
ArmScmiClockProtocolPrivate.h:66
CLOCK_CONFIG_SET_ATTRIBUTES
Definition:
ArmScmiClockProtocolPrivate.h:57
CLOCK_DESCRIBE_RATES
Definition:
ArmScmiClockProtocolPrivate.h:38
CLOCK_RATE_DWORD
Definition:
ArmScmiClockProtocolPrivate.h:18
CLOCK_RATE_SET_ATTRIBUTES
Definition:
ArmScmiClockProtocolPrivate.h:50
ArmPkg
Drivers
ArmScmiDxe
ArmScmiClockProtocolPrivate.h
Generated on Fri Nov 15 2024 18:01:04 for TianoCore EDK2 by
1.9.6