ArmPkg[all]  0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ArmScmiClock2Protocol.h File Reference

Data Structures

struct  _SCMI_CLOCK2_PROTOCOL
 

Macros

#define ARM_SCMI_CLOCK2_PROTOCOL_GUID
 
#define SCMI_CLOCK2_PROTOCOL_VERSION   1
 

Typedefs

typedef struct
_SCMI_CLOCK2_PROTOCOL 
SCMI_CLOCK2_PROTOCOL
 
typedef OUT UINT32 * Version
 
typedef OUT UINT32 * TotalClocks
 
typedef IN UINT32 ClockId
 
typedef IN UINT32 OUT BOOLEAN * Enabled
 
typedef IN UINT32 OUT BOOLEAN
OUT CHAR8 * 
ClockAsciiName
 
typedef IN UINT32 OUT
SCMI_CLOCK_RATE_FORMAT
Format
 
typedef IN UINT32 OUT
SCMI_CLOCK_RATE_FORMAT OUT
UINT32 * 
TotalRates
 
typedef IN UINT32 OUT
SCMI_CLOCK_RATE_FORMAT OUT
UINT32 IN OUT UINT32 * 
RateArraySize
 
typedef IN UINT32 OUT
SCMI_CLOCK_RATE_FORMAT OUT
UINT32 IN OUT UINT32 OUT
SCMI_CLOCK_RATE
RateArray
 
typedef IN UINT32 OUT UINT64 * Rate
 
typedef IN UINT32 IN BOOLEAN Enable
 

Functions

typedef EFI_STATUS (EFIAPI *SCMI_CLOCK2_GET_VERSION)(IN SCMI_CLOCK2_PROTOCOL *This
 

Variables

EFI_GUID gArmScmiClock2ProtocolGuid
 

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

Macro Definition Documentation

#define ARM_SCMI_CLOCK2_PROTOCOL_GUID
Value:
{ \
0xb8d8caf2, 0x9e94, 0x462c, { 0xa8, 0x34, 0x6c, 0x99, 0xfc, 0x05, 0xef, 0xcf } \
}
#define SCMI_CLOCK2_PROTOCOL_VERSION   1

Typedef Documentation

typedef IN UINT32 OUT BOOLEAN OUT CHAR8* ClockAsciiName
typedef IN UINT32 ClockId
typedef IN UINT32 IN BOOLEAN Enable
typedef IN UINT32 OUT BOOLEAN* Enabled
typedef IN UINT32 OUT SCMI_CLOCK_RATE_FORMAT* Format
typedef IN UINT32 IN UINT64 Rate
typedef IN UINT32 OUT SCMI_CLOCK_RATE_FORMAT OUT UINT32 IN OUT UINT32 OUT SCMI_CLOCK_RATE* RateArray
typedef IN UINT32 OUT SCMI_CLOCK_RATE_FORMAT OUT UINT32 IN OUT UINT32* RateArraySize
typedef OUT UINT32* TotalClocks
typedef IN UINT32 OUT SCMI_CLOCK_RATE_FORMAT OUT UINT32* TotalRates
typedef OUT UINT32* Version

Function Documentation

typedef EFI_STATUS ( EFIAPI *  SCMI_CLOCK2_ENABLE)

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

Parameters
[in]ThisA Pointer to SCMI_CLOCK2_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.

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

Parameters
[in]ThisA Pointer to SCMI_CLOCK2_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.

Return attributes of a clock device.

Parameters
[in]ThisA Pointer to SCMI_CLOCK2_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.

Return list of rates supported by a given clock device.

Parameters
[in]ThisA pointer to SCMI_CLOCK2_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.

Get clock rate.

Parameters
[in]ThisA Pointer to SCMI_CLOCK2_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.

Set clock rate.

Parameters
[in]ThisA Pointer to SCMI_CLOCK2_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.

Enable/Disable specified clock. Function is only available under gArmScmiClock2ProtocolGuid

Parameters
[in]ThisA Pointer to SCMI_CLOCK2_PROTOCOL Instance.
[in]ClockIdIdentifier for the clock device.
[in]EnableTRUE to enable, FALSE to disable.
Return values
EFI_SUCCESSClock enable/disable successful.
EFI_DEVICE_ERRORSCP returns an SCMI error.
!(EFI_SUCCESS)Other errors.

Variable Documentation

EFI_GUID gArmScmiClock2ProtocolGuid