21ArmVirtPL031FdtClientLibConstructor (
31 RETURN_STATUS PcdStatus;
33 Status =
gBS->LocateProtocol (
34 &gFdtClientProtocolGuid,
40 Status = FdtClient->FindCompatibleNode (FdtClient,
"arm,pl031", &Node);
41 if (EFI_ERROR (Status)) {
44 "%a: No 'arm,pl031' compatible DT node found\n",
50 Status = FdtClient->GetNodeProperty (
57 if (EFI_ERROR (Status)) {
60 "%a: No 'reg' property found in 'arm,pl031' compatible DT node\n",
66 ASSERT (RegSize == 16);
69 ASSERT (RegBase < MAX_UINT32);
71 PcdStatus =
PcdSet32S (PcdPL031RtcBase, (UINT32)RegBase);
74 DEBUG ((DEBUG_INFO,
"Found PL031 RTC @ 0x%Lx\n", RegBase));
82 Status = FdtClient->SetNodeProperty (
89 if (EFI_ERROR (Status)) {
90 DEBUG ((DEBUG_WARN,
"Failed to set PL031 status to 'disabled'\n"));
UINT64 EFIAPI SwapBytes64(IN UINT64 Value)
#define ASSERT_EFI_ERROR(StatusParameter)
#define ASSERT_RETURN_ERROR(StatusParameter)
#define DEBUG(Expression)
#define PcdSet32S(TokenName, Value)