]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg/VirtFdtDxe: drop RTC handling
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 8 Apr 2016 09:45:05 +0000 (11:45 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 13 Apr 2016 15:26:05 +0000 (17:26 +0200)
The RTC driver no longer relies on VirtFdtDxe to set the pl031 RTC base
address in a dynamic PCD, so drop the handling altogether.

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

index 31e0ca7db8b480c90bfb048f5cb23b04e756cb7c..4fca50a6b34798765115d1d39145ea760f06bfa4 100644 (file)
@@ -42,7 +42,6 @@ typedef struct {
 \r
 typedef enum {\r
   PropertyTypeUnknown,\r
-  PropertyTypeRtc,\r
   PropertyTypeVirtio,\r
   PropertyTypeUart,\r
   PropertyTypeXen,\r
@@ -54,7 +53,6 @@ typedef struct {
 } PROPERTY;\r
 \r
 STATIC CONST PROPERTY CompatibleProperties[] = {\r
-  { PropertyTypeRtc,     "arm,pl031"             },\r
   { PropertyTypeVirtio,  "virtio,mmio"           },\r
   { PropertyTypeUart,    "arm,pl011"             },\r
   { PropertyTypeXen,     "xen,xen"               },\r
@@ -96,7 +94,6 @@ InitializeVirtFdtDxe (
   VOID                           *Hob;\r
   VOID                           *DeviceTreeBase;\r
   INT32                          Node, Prev;\r
-  INT32                          RtcNode;\r
   EFI_STATUS                     Status;\r
   CONST CHAR8                    *Type;\r
   INT32                          Len;\r
@@ -119,7 +116,6 @@ InitializeVirtFdtDxe (
 \r
   DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, DeviceTreeBase));\r
 \r
-  RtcNode = -1;\r
   //\r
   // Now enumerate the nodes and install peripherals that we are interested in,\r
   // i.e., GIC, RTC and virtio MMIO nodes\r
@@ -196,18 +192,6 @@ InitializeVirtFdtDxe (
       }\r
       break;\r
 \r
-    case PropertyTypeRtc:\r
-      ASSERT (Len == 16);\r
-\r
-      RegBase = fdt64_to_cpu (((UINT64 *)RegProp)[0]);\r
-      ASSERT (RegBase < MAX_UINT32);\r
-\r
-      PcdSet32 (PcdPL031RtcBase, (UINT32)RegBase);\r
-\r
-      DEBUG ((EFI_D_INFO, "Found PL031 RTC @ 0x%Lx\n", RegBase));\r
-      RtcNode = Node;\r
-      break;\r
-\r
     case PropertyTypeXen:\r
       ASSERT (Len == 16);\r
 \r
@@ -240,18 +224,7 @@ InitializeVirtFdtDxe (
     //\r
     Status = gBS->InstallConfigurationTable (&gFdtTableGuid, DeviceTreeBase);\r
     ASSERT_EFI_ERROR (Status);\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 its\r
-    // device driver as well.\r
-    //\r
-    if ((RtcNode != -1) &&\r
-        fdt_setprop_string (DeviceTreeBase, RtcNode, "status",\r
-          "disabled") != 0) {\r
-      DEBUG ((EFI_D_WARN, "Failed to set PL031 status to 'disabled'\n"));\r
-    }\r
   }\r
+\r
   return EFI_SUCCESS;\r
 }\r
index 8ebce337747f85ad643f8c7877ca39a71cc63a8a..8c098e5885aef8ba72a70c0a69c853290da5565e 100644 (file)
@@ -49,9 +49,6 @@
   gVirtioMmioTransportGuid\r
   gFdtHobGuid\r
 \r
-[Pcd]\r
-  gArmPlatformTokenSpaceGuid.PcdPL031RtcBase\r
-\r
 [FeaturePcd]\r
   gArmVirtTokenSpaceGuid.PcdPureAcpiBoot\r
 \r