]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg/VirtFdtDxe: remove timer DT node handling
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 8 Apr 2016 09:44:57 +0000 (11:44 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 11 Apr 2016 16:12:22 +0000 (18:12 +0200)
The timer code no longer relies on VirtFdtDxe to set the PCDs, so remove
the handling of the timer node and the references to those PCDs.

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 4a4713cf6ad8001e399738a3d60ff14fbf24f69c..368618956be17148043db5b46901afcdb966b532 100644 (file)
@@ -45,7 +45,6 @@ typedef enum {
   PropertyTypeRtc,\r
   PropertyTypeVirtio,\r
   PropertyTypeUart,\r
-  PropertyTypeTimer,\r
   PropertyTypeFwCfg,\r
   PropertyTypePciHost,\r
   PropertyTypeXen,\r
@@ -60,20 +59,12 @@ STATIC CONST PROPERTY CompatibleProperties[] = {
   { PropertyTypeRtc,     "arm,pl031"             },\r
   { PropertyTypeVirtio,  "virtio,mmio"           },\r
   { PropertyTypeUart,    "arm,pl011"             },\r
-  { PropertyTypeTimer,   "arm,armv7-timer"       },\r
-  { PropertyTypeTimer,   "arm,armv8-timer"       },\r
   { PropertyTypeFwCfg,   "qemu,fw-cfg-mmio"      },\r
   { PropertyTypePciHost, "pci-host-ecam-generic" },\r
   { PropertyTypeXen,     "xen,xen"               },\r
   { PropertyTypeUnknown, ""                      }\r
 };\r
 \r
-typedef struct {\r
-  UINT32  Type;\r
-  UINT32  Number;\r
-  UINT32  Flags;\r
-} INTERRUPT_PROPERTY;\r
-\r
 STATIC\r
 PROPERTY_TYPE\r
 GetTypeFromNode (\r
@@ -288,8 +279,6 @@ InitializeVirtFdtDxe (
   VIRTIO_TRANSPORT_DEVICE_PATH   *DevicePath;\r
   EFI_HANDLE                     Handle;\r
   UINT64                         RegBase;\r
-  CONST INTERRUPT_PROPERTY       *InterruptProp;\r
-  INT32                          SecIntrNum, IntrNum, VirtIntrNum, HypIntrNum;\r
   UINT64                         FwCfgSelectorAddress;\r
   UINT64                         FwCfgSelectorSize;\r
   UINT64                         FwCfgDataAddress;\r
@@ -339,7 +328,7 @@ InitializeVirtFdtDxe (
     // TODO use #cells root properties instead\r
     //\r
     RegProp = fdt_getprop (DeviceTreeBase, Node, "reg", &Len);\r
-    ASSERT ((RegProp != NULL) || (PropType == PropertyTypeTimer));\r
+    ASSERT (RegProp != NULL);\r
 \r
     switch (PropType) {\r
     case PropertyTypePciHost:\r
@@ -449,32 +438,6 @@ InitializeVirtFdtDxe (
       RtcNode = Node;\r
       break;\r
 \r
-    case PropertyTypeTimer:\r
-      //\r
-      // - interrupts : Interrupt list for secure, non-secure, virtual and\r
-      //  hypervisor timers, in that order.\r
-      //\r
-      InterruptProp = fdt_getprop (DeviceTreeBase, Node, "interrupts", &Len);\r
-      ASSERT (Len == 36 || Len == 48);\r
-\r
-      SecIntrNum = fdt32_to_cpu (InterruptProp[0].Number)\r
-                   + (InterruptProp[0].Type ? 16 : 0);\r
-      IntrNum = fdt32_to_cpu (InterruptProp[1].Number)\r
-                + (InterruptProp[1].Type ? 16 : 0);\r
-      VirtIntrNum = fdt32_to_cpu (InterruptProp[2].Number)\r
-                    + (InterruptProp[2].Type ? 16 : 0);\r
-      HypIntrNum = Len < 48 ? 0 : fdt32_to_cpu (InterruptProp[3].Number)\r
-                                  + (InterruptProp[3].Type ? 16 : 0);\r
-\r
-      DEBUG ((EFI_D_INFO, "Found Timer interrupts %d, %d, %d, %d\n",\r
-        SecIntrNum, IntrNum, VirtIntrNum, HypIntrNum));\r
-\r
-      PcdSet32 (PcdArmArchTimerSecIntrNum, SecIntrNum);\r
-      PcdSet32 (PcdArmArchTimerIntrNum, IntrNum);\r
-      PcdSet32 (PcdArmArchTimerVirtIntrNum, VirtIntrNum);\r
-      PcdSet32 (PcdArmArchTimerHypIntrNum, HypIntrNum);\r
-      break;\r
-\r
     case PropertyTypeXen:\r
       ASSERT (Len == 16);\r
 \r
index 5526fd19250eb0a76ac7ae8d9b42464f10a01efd..c928e826c258261d9fc29724d849c1c59faae262 100644 (file)
   gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress\r
   gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress\r
   gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress\r
-  gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum\r
-  gArmTokenSpaceGuid.PcdArmArchTimerIntrNum\r
-  gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum\r
-  gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum\r
   gArmPlatformTokenSpaceGuid.PcdPL031RtcBase\r
   gArmPlatformTokenSpaceGuid.PcdPciBusMin\r
   gArmPlatformTokenSpaceGuid.PcdPciBusMax\r