Skip to content

Commit 6d18a05

Browse files
committed
sdm845: remove clock setting code in MsPlatformDevicesLib
1 parent dd20001 commit 6d18a05

File tree

2 files changed

+0
-48
lines changed

2 files changed

+0
-48
lines changed

Silicon/Qualcomm/sdm845/Library/MsPlatformDevicesLib/MsPlatformDevicesLib.c

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -29,51 +29,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
2929
#include <Protocol/EFIChipInfo.h>
3030
#include <Protocol/EFIPlatformInfo.h>
3131
#include <Protocol/EFISmem.h>
32-
#include <Protocol/EFIClock.h>
33-
34-
EFI_STATUS
35-
EFIAPI
36-
SetupAPSSCpuPerfLevels()
37-
{
38-
EFI_STATUS Status = EFI_SUCCESS;
39-
EFI_CLOCK_PROTOCOL *pClockProtocol = NULL;
40-
UINT32 perfLevel = 0;
41-
UINT32 frequencyHz = 0;
42-
43-
Status = gBS->LocateProtocol(
44-
&gEfiClockProtocolGuid,
45-
NULL,
46-
(VOID **)&pClockProtocol
47-
);
48-
49-
if (EFI_ERROR(Status)) {
50-
return Status;
51-
}
52-
53-
DEBUG((EFI_D_INFO, "\n\n\n\n\n\n\n\n\n\n\n\n\n"));
54-
55-
// The 9th cluster is L3 cache
56-
for (int i = 0; i < 9; i++) {
57-
Status = pClockProtocol->GetMaxPerfLevel(pClockProtocol, i, &perfLevel);
58-
59-
if (EFI_ERROR(Status)) {
60-
DEBUG((EFI_D_ERROR, "%a: Failed to get the maximum performance level for CPU %d, Status: %r\n", __FUNCTION__, i, Status));
61-
return Status;
62-
}
63-
64-
Status = pClockProtocol->SetCpuPerfLevel(pClockProtocol, i, perfLevel, &frequencyHz);
65-
66-
if (EFI_ERROR(Status)) {
67-
DEBUG((EFI_D_ERROR, "%a: Failed to set the maximum performance level for CPU %d, Status: %r\n", __FUNCTION__, i, Status));
68-
return Status;
69-
}
70-
71-
DEBUG((EFI_D_INFO, "%a: CPU %d Now running at %d Hz\n", __FUNCTION__, i, frequencyHz));
72-
}
73-
74-
// gBS->Stall(10 * 1000 * 1000);
75-
return Status;
76-
}
7732

7833
EFI_STATUS
7934
EFIAPI
@@ -231,8 +186,6 @@ VOID
231186
EFIAPI
232187
PlatformSetup()
233188
{
234-
SetupAPSSCpuPerfLevels();
235-
236189
// Allow MPSS and HLOS to access the allocated RFS Shared Memory Region
237190
// Normally this would be done by a driver in Linux
238191
// TODO: Move to a better place!

Silicon/Qualcomm/sdm845/Library/MsPlatformDevicesLib/MsPlatformDevicesLib.inf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,4 @@
4343
gEfiChipInfoProtocolGuid ## CONSUMES
4444
gQcomSMEMProtocolGuid ## CONSUMES
4545
gEfiPlatformInfoProtocolGuid ## CONSUMES
46-
gEfiClockProtocolGuid
4746

0 commit comments

Comments
 (0)