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
typedef EFI_STATUS |
( |
EFIAPI * |
SCMI_CLOCK2_ENABLE | ) |
|
Return version of the clock management protocol supported by SCP firmware.
- Parameters
-
[in] | This | A Pointer to SCMI_CLOCK2_PROTOCOL Instance. |
[out] | Version | Version of the supported SCMI Clock management protocol. |
- Return values
-
EFI_SUCCESS | The version is returned. |
EFI_DEVICE_ERROR | SCP returns an SCMI error. |
!(EFI_SUCCESS) | Other errors. |
Return total number of clock devices supported by the clock management protocol.
- Parameters
-
[in] | This | A Pointer to SCMI_CLOCK2_PROTOCOL Instance. |
[out] | TotalClocks | Total number of clocks supported. |
- Return values
-
EFI_SUCCESS | Total number of clocks supported is returned. |
EFI_DEVICE_ERROR | SCP returns an SCMI error. |
!(EFI_SUCCESS) | Other errors. |
Return attributes of a clock device.
- Parameters
-
[in] | This | A Pointer to SCMI_CLOCK2_PROTOCOL Instance. |
[in] | ClockId | Identifier for the clock device. |
[out] | Enabled | If TRUE, the clock device is enabled. |
[out] | ClockAsciiName | A NULL terminated ASCII string with the clock name, of up to 16 bytes. |
- Return values
-
EFI_SUCCESS | Clock device attributes are returned. |
EFI_DEVICE_ERROR | SCP returns an SCMI error. |
!(EFI_SUCCESS) | Other errors. |
Return list of rates supported by a given clock device.
- Parameters
-
[in] | This | A pointer to SCMI_CLOCK2_PROTOCOL Instance. |
[in] | ClockId | Identifier for the clock device. |
[out] | Format | ScmiClockRateFormatDiscrete: 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] | TotalRates | Total number of rates. |
[in,out] | RateArraySize | Size of the RateArray. |
[out] | RateArray | List of clock rates. |
- Return values
-
EFI_SUCCESS | List of clock rates are returned. |
EFI_DEVICE_ERROR | SCP returns an SCMI error. |
EFI_BUFFER_TOO_SMALL | RateArraySize is too small for the result. It has been updated to the size needed. |
!(EFI_SUCCESS) | Other errors. |
Get clock rate.
- Parameters
-
[in] | This | A Pointer to SCMI_CLOCK2_PROTOCOL Instance. |
[in] | ClockId | Identifier for the clock device. |
[out] | Rate | Clock rate. |
- Return values
-
EFI_SUCCESS | Clock rate is returned. |
EFI_DEVICE_ERROR | SCP returns an SCMI error. |
!(EFI_SUCCESS) | Other errors. |
Set clock rate.
- Parameters
-
[in] | This | A Pointer to SCMI_CLOCK2_PROTOCOL Instance. |
[in] | ClockId | Identifier for the clock device. |
[in] | Rate | Clock rate. |
- Return values
-
EFI_SUCCESS | Clock rate set success. |
EFI_DEVICE_ERROR | SCP returns an SCMI error. |
!(EFI_SUCCESS) | Other errors. |
Enable/Disable specified clock. Function is only available under gArmScmiClock2ProtocolGuid
- Parameters
-
[in] | This | A Pointer to SCMI_CLOCK2_PROTOCOL Instance. |
[in] | ClockId | Identifier for the clock device. |
[in] | Enable | TRUE to enable, FALSE to disable. |
- Return values
-
EFI_SUCCESS | Clock enable/disable successful. |
EFI_DEVICE_ERROR | SCP returns an SCMI error. |
!(EFI_SUCCESS) | Other errors. |