TianoCore EDK2 master
Loading...
Searching...
No Matches
ArmScmiClockProtocol.h File Reference
#include <Protocol/ArmScmi.h>

Go to the source code of this file.

Data Structures

struct  SCMI_CLOCK_RATE_CONTINUOUS
 
struct  SCMI_CLOCK_RATE_DISCRETE
 
union  SCMI_CLOCK_RATE
 
struct  _SCMI_CLOCK_PROTOCOL
 

Macros

#define ARM_SCMI_CLOCK_PROTOCOL_GUID
 
#define SCMI_CLOCK_PROTOCOL_VERSION   0x10000
 
#define SCMI_CLOCK_PROTOCOL_PENDING_ASYNC_RATES_MASK   0xFFU
 
#define SCMI_CLOCK_PROTOCOL_PENDING_ASYNC_RATES_SHIFT   16
 
#define SCMI_CLOCK_PROTOCOL_NUM_CLOCKS_MASK   0xFFFFU
 
#define SCMI_CLOCK_PROTOCOL_MAX_ASYNC_CLK_RATES(Attr)
 
#define SCMI_CLOCK_PROTOCOL_TOTAL_CLKS(Attr)   (Attr & SCMI_CLOCK_PROTOCOL_NUM_CLOCKS_MASK)
 

Typedefs

typedef struct _SCMI_CLOCK_PROTOCOL SCMI_CLOCK_PROTOCOL
 
typedef EFI_STATUS(EFIAPI * SCMI_CLOCK_GET_VERSION) (IN SCMI_CLOCK_PROTOCOL *This, OUT UINT32 *Version)
 
typedef EFI_STATUS(EFIAPI * SCMI_CLOCK_GET_TOTAL_CLOCKS) (IN SCMI_CLOCK_PROTOCOL *This, OUT UINT32 *TotalClocks)
 
typedef EFI_STATUS(EFIAPI * SCMI_CLOCK_GET_CLOCK_ATTRIBUTES) (IN SCMI_CLOCK_PROTOCOL *This, IN UINT32 ClockId, OUT BOOLEAN *Enabled, OUT CHAR8 *ClockAsciiName)
 
typedef EFI_STATUS(EFIAPI * SCMI_CLOCK_DESCRIBE_RATES) (IN SCMI_CLOCK_PROTOCOL *This, IN UINT32 ClockId, OUT SCMI_CLOCK_RATE_FORMAT *Format, OUT UINT32 *TotalRates, IN OUT UINT32 *RateArraySize, OUT SCMI_CLOCK_RATE *RateArray)
 
typedef EFI_STATUS(EFIAPI * SCMI_CLOCK_RATE_GET) (IN SCMI_CLOCK_PROTOCOL *This, IN UINT32 ClockId, OUT UINT64 *Rate)
 
typedef EFI_STATUS(EFIAPI * SCMI_CLOCK_RATE_SET) (IN SCMI_CLOCK_PROTOCOL *This, IN UINT32 ClockId, IN UINT64 Rate)
 

Enumerations

enum  SCMI_MESSAGE_ID_CLOCK {
  ScmiMessageIdClockAttributes = 0x3 , ScmiMessageIdClockDescribeRates = 0x4 , ScmiMessageIdClockRateSet = 0x5 , ScmiMessageIdClockRateGet = 0x6 ,
  ScmiMessageIdClockConfigSet = 0x7
}
 
enum  SCMI_CLOCK_RATE_FORMAT { ScmiClockRateFormatDiscrete , ScmiClockRateFormatLinear }
 

Variables

EFI_GUID gArmScmiClockProtocolGuid
 

Detailed Description

Copyright (c) 2017-2021, Arm Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

System Control and Management Interface V1.0 http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/ DEN0056A_System_Control_and_Management_Interface.pdf

Definition in file ArmScmiClockProtocol.h.

Macro Definition Documentation

◆ ARM_SCMI_CLOCK_PROTOCOL_GUID

#define ARM_SCMI_CLOCK_PROTOCOL_GUID
Value:
{\
0x91ce67a8, 0xe0aa, 0x4012, {0xb9, 0x9f, 0xb6, 0xfc, 0xf3, 0x4, 0x8e, 0xaa} \
}

Definition at line 17 of file ArmScmiClockProtocol.h.

◆ SCMI_CLOCK_PROTOCOL_MAX_ASYNC_CLK_RATES

#define SCMI_CLOCK_PROTOCOL_MAX_ASYNC_CLK_RATES (   Attr)
Value:
( \
(Attr >> SCMI_CLOCK_PROTOCOL_PENDING_ASYNC_RATES_SHIFT) && \
SCMI_CLOCK_PROTOCOL_PENDING_ASYNC_RATES_MASK)

Total number of pending asynchronous clock rates changes supported by the SCP, Attr Bits[23:16]

Definition at line 47 of file ArmScmiClockProtocol.h.

◆ SCMI_CLOCK_PROTOCOL_NUM_CLOCKS_MASK

#define SCMI_CLOCK_PROTOCOL_NUM_CLOCKS_MASK   0xFFFFU

Definition at line 42 of file ArmScmiClockProtocol.h.

◆ SCMI_CLOCK_PROTOCOL_PENDING_ASYNC_RATES_MASK

#define SCMI_CLOCK_PROTOCOL_PENDING_ASYNC_RATES_MASK   0xFFU

Definition at line 40 of file ArmScmiClockProtocol.h.

◆ SCMI_CLOCK_PROTOCOL_PENDING_ASYNC_RATES_SHIFT

#define SCMI_CLOCK_PROTOCOL_PENDING_ASYNC_RATES_SHIFT   16

Definition at line 41 of file ArmScmiClockProtocol.h.

◆ SCMI_CLOCK_PROTOCOL_TOTAL_CLKS

#define SCMI_CLOCK_PROTOCOL_TOTAL_CLKS (   Attr)    (Attr & SCMI_CLOCK_PROTOCOL_NUM_CLOCKS_MASK)

Definition at line 52 of file ArmScmiClockProtocol.h.

◆ SCMI_CLOCK_PROTOCOL_VERSION

#define SCMI_CLOCK_PROTOCOL_VERSION   0x10000

Definition at line 38 of file ArmScmiClockProtocol.h.

Typedef Documentation

◆ SCMI_CLOCK_DESCRIBE_RATES

typedef EFI_STATUS(EFIAPI * SCMI_CLOCK_DESCRIBE_RATES) (IN SCMI_CLOCK_PROTOCOL *This, IN UINT32 ClockId, OUT SCMI_CLOCK_RATE_FORMAT *Format, OUT UINT32 *TotalRates, IN OUT UINT32 *RateArraySize, OUT SCMI_CLOCK_RATE *RateArray)

Return list of rates supported by a given clock device.

Parameters
[in]ThisA pointer to SCMI_CLOCK_PROTOCOL Instance.
[in]ClockIdIdentifier for the clock device.
[out]FormatScmiClockRateFormatDiscrete: Clock device supports range of clock rates which are non-linear.

ScmiClockRateFormatLinear: Clock device supports range of linear clock rates from Min to Max in steps.

Parameters
[out]TotalRatesTotal number of rates.
[in,out]RateArraySizeSize of the RateArray.
[out]RateArrayList of clock rates.
Return values
EFI_SUCCESSList of clock rates are returned.
EFI_DEVICE_ERRORSCP returns an SCMI error.
EFI_BUFFER_TOO_SMALLRateArraySize is too small for the result. It has been updated to the size needed.
!(EFI_SUCCESS)Other errors.

Definition at line 161 of file ArmScmiClockProtocol.h.

◆ SCMI_CLOCK_GET_CLOCK_ATTRIBUTES

typedef EFI_STATUS(EFIAPI * SCMI_CLOCK_GET_CLOCK_ATTRIBUTES) (IN SCMI_CLOCK_PROTOCOL *This, IN UINT32 ClockId, OUT BOOLEAN *Enabled, OUT CHAR8 *ClockAsciiName)

Return attributes of a clock device.

Parameters
[in]ThisA Pointer to SCMI_CLOCK_PROTOCOL Instance.
[in]ClockIdIdentifier for the clock device.
[out]EnabledIf TRUE, the clock device is enabled.
[out]ClockAsciiNameA NULL terminated ASCII string with the clock name, of up to 16 bytes.
Return values
EFI_SUCCESSClock device attributes are returned.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 129 of file ArmScmiClockProtocol.h.

◆ SCMI_CLOCK_GET_TOTAL_CLOCKS

typedef EFI_STATUS(EFIAPI * SCMI_CLOCK_GET_TOTAL_CLOCKS) (IN SCMI_CLOCK_PROTOCOL *This, OUT UINT32 *TotalClocks)

Return total number of clock devices supported by the clock management protocol.

Parameters
[in]ThisA Pointer to SCMI_CLOCK_PROTOCOL Instance.
[out]TotalClocksTotal number of clocks supported.
Return values
EFI_SUCCESSTotal number of clocks supported is returned.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 109 of file ArmScmiClockProtocol.h.

◆ SCMI_CLOCK_GET_VERSION

typedef EFI_STATUS(EFIAPI * SCMI_CLOCK_GET_VERSION) (IN SCMI_CLOCK_PROTOCOL *This, OUT UINT32 *Version)

Return version of the clock management protocol supported by SCP firmware.

Parameters
[in]ThisA Pointer to SCMI_CLOCK_PROTOCOL Instance.
[out]VersionVersion of the supported SCMI Clock management protocol.
Return values
EFI_SUCCESSThe version is returned.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 91 of file ArmScmiClockProtocol.h.

◆ SCMI_CLOCK_PROTOCOL

Definition at line 76 of file ArmScmiClockProtocol.h.

◆ SCMI_CLOCK_RATE_GET

typedef EFI_STATUS(EFIAPI * SCMI_CLOCK_RATE_GET) (IN SCMI_CLOCK_PROTOCOL *This, IN UINT32 ClockId, OUT UINT64 *Rate)

Get clock rate.

Parameters
[in]ThisA Pointer to SCMI_CLOCK_PROTOCOL Instance.
[in]ClockIdIdentifier for the clock device.
[out]RateClock rate.
Return values
EFI_SUCCESSClock rate is returned.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 183 of file ArmScmiClockProtocol.h.

◆ SCMI_CLOCK_RATE_SET

typedef EFI_STATUS(EFIAPI * SCMI_CLOCK_RATE_SET) (IN SCMI_CLOCK_PROTOCOL *This, IN UINT32 ClockId, IN UINT64 Rate)

Set clock rate.

Parameters
[in]ThisA Pointer to SCMI_CLOCK_PROTOCOL Instance.
[in]ClockIdIdentifier for the clock device.
[in]RateClock rate.
Return values
EFI_SUCCESSClock rate set success.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Definition at line 201 of file ArmScmiClockProtocol.h.

Enumeration Type Documentation

◆ SCMI_CLOCK_RATE_FORMAT

enum SCMI_CLOCK_RATE_FORMAT

Definition at line 32 of file ArmScmiClockProtocol.h.

◆ SCMI_MESSAGE_ID_CLOCK

enum SCMI_MESSAGE_ID_CLOCK

Definition at line 24 of file ArmScmiClockProtocol.h.