/* Return total number of clock devices supported by the clock management protocol. */
STATIC EFI_STATUS ClockGetTotalClocks(IN SCMI_CLOCK_PROTOCOL *This, OUT UINT32 *TotalClocks)
/* Return total number of clock devices supported by the clock management protocol. */
STATIC EFI_STATUS ClockGetTotalClocks(IN SCMI_CLOCK_PROTOCOL *This, OUT UINT32 *TotalClocks)
{
  EFI_STATUS  Status;
  UINT32      *ReturnValues;
  Status = ScmiGetProtocolAttributes (ScmiProtocolIdClock, &ReturnValues);
  if (EFI_ERROR (Status)) {
    return Status;
  }
  *TotalClocks = SCMI_CLOCK_PROTOCOL_TOTAL_CLKS (ReturnValues[0]);
  return EFI_SUCCESS;
}