]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg/ArmVirtPL031FdtClientLib: unconditionally disable DT node
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 9 Mar 2017 15:38:53 +0000 (16:38 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 9 Mar 2017 17:37:04 +0000 (18:37 +0100)
Disable the PL031 RTC DT node unconditionally rather than only when
the DT will be exposed to the OS. This allows us to defer the decision
whether to expose it to the OS to a later time without creating an
additional dependency on the FDT client code by the RTC driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.c
ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf

index 82de7a51b32e8ea6de0c4b62a44378cf57dd1ad3..d168424a52f5ed2ccc92c8cf1783b7f4227e6021 100644 (file)
@@ -66,18 +66,16 @@ ArmVirtPL031FdtClientLibConstructor (
 \r
   DEBUG ((EFI_D_INFO, "Found PL031 RTC @ 0x%Lx\n", RegBase));\r
 \r
-  if (!FeaturePcdGet (PcdPureAcpiBoot)) {\r
-    //\r
-    // UEFI takes ownership of the RTC hardware, and exposes its functionality\r
-    // through the UEFI Runtime Services GetTime, SetTime, etc. This means we\r
-    // need to disable it in the device tree to prevent the OS from attaching\r
-    // its device driver as well.\r
-    //\r
-    Status = FdtClient->SetNodeProperty (FdtClient, Node, "status",\r
-                          "disabled", sizeof ("disabled"));\r
-    if (EFI_ERROR (Status)) {\r
-        DEBUG ((EFI_D_WARN, "Failed to set PL031 status to 'disabled'\n"));\r
-    }\r
+  //\r
+  // UEFI takes ownership of the RTC hardware, and exposes its functionality\r
+  // through the UEFI Runtime Services GetTime, SetTime, etc. This means we\r
+  // need to disable it in the device tree to prevent the OS from attaching\r
+  // its device driver as well.\r
+  //\r
+  Status = FdtClient->SetNodeProperty (FdtClient, Node, "status",\r
+                        "disabled", sizeof ("disabled"));\r
+  if (EFI_ERROR (Status)) {\r
+      DEBUG ((EFI_D_WARN, "Failed to set PL031 status to 'disabled'\n"));\r
   }\r
 \r
   return EFI_SUCCESS;\r
index 32dbff6f08526ae685eb3256d6a89b9d55c81b72..342193651a869255a86a88f1313dce461c723fc5 100644 (file)
@@ -42,8 +42,5 @@
 [Pcd]\r
   gArmPlatformTokenSpaceGuid.PcdPL031RtcBase\r
 \r
-[FeaturePcd]\r
-  gArmVirtTokenSpaceGuid.PcdPureAcpiBoot\r
-\r
 [Depex]\r
   gFdtClientProtocolGuid\r