]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c
ArmVirtPkg/VirtFdtDxe: move FDT config table installation to FdtClientDxe
[mirror_edk2.git] / ArmVirtPkg / VirtFdtDxe / VirtFdtDxe.c
index 31e0ca7db8b480c90bfb048f5cb23b04e756cb7c..cebd4aa91fd9e6f0af50b2af546159bfa2142e6f 100644 (file)
@@ -28,7 +28,6 @@
 #include <libfdt.h>\r
 #include <Library/XenIoMmioLib.h>\r
 \r
-#include <Guid/Fdt.h>\r
 #include <Guid/VirtioMmioTransport.h>\r
 #include <Guid/FdtHob.h>\r
 \r
@@ -42,9 +41,7 @@ typedef struct {
 \r
 typedef enum {\r
   PropertyTypeUnknown,\r
-  PropertyTypeRtc,\r
   PropertyTypeVirtio,\r
-  PropertyTypeUart,\r
   PropertyTypeXen,\r
 } PROPERTY_TYPE;\r
 \r
@@ -54,9 +51,7 @@ 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
   { PropertyTypeUnknown, ""                      }\r
 };\r
@@ -96,7 +91,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 +113,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 +189,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
@@ -233,25 +214,5 @@ InitializeVirtFdtDxe (
     }\r
   }\r
 \r
-  if (!FeaturePcdGet (PcdPureAcpiBoot)) {\r
-    //\r
-    // Only install the FDT as a configuration table if we want to leave it up\r
-    // to the OS to decide whether it prefers ACPI over DT.\r
-    //\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
   return EFI_SUCCESS;\r
 }\r