From 479d5c4175e77f1cd7e61855fa3c9f83c330ef4f Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 8 Apr 2016 11:44:57 +0200 Subject: ArmVirtPkg/VirtFdtDxe: remove timer DT node handling 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 Reviewed-by: Laszlo Ersek --- ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c | 39 +----------------------------------- ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf | 4 ---- 2 files changed, 1 insertion(+), 42 deletions(-) (limited to 'ArmVirtPkg') diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c index 4a4713cf6a..368618956b 100644 --- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c +++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c @@ -45,7 +45,6 @@ typedef enum { PropertyTypeRtc, PropertyTypeVirtio, PropertyTypeUart, - PropertyTypeTimer, PropertyTypeFwCfg, PropertyTypePciHost, PropertyTypeXen, @@ -60,20 +59,12 @@ STATIC CONST PROPERTY CompatibleProperties[] = { { PropertyTypeRtc, "arm,pl031" }, { PropertyTypeVirtio, "virtio,mmio" }, { PropertyTypeUart, "arm,pl011" }, - { PropertyTypeTimer, "arm,armv7-timer" }, - { PropertyTypeTimer, "arm,armv8-timer" }, { PropertyTypeFwCfg, "qemu,fw-cfg-mmio" }, { PropertyTypePciHost, "pci-host-ecam-generic" }, { PropertyTypeXen, "xen,xen" }, { PropertyTypeUnknown, "" } }; -typedef struct { - UINT32 Type; - UINT32 Number; - UINT32 Flags; -} INTERRUPT_PROPERTY; - STATIC PROPERTY_TYPE GetTypeFromNode ( @@ -288,8 +279,6 @@ InitializeVirtFdtDxe ( VIRTIO_TRANSPORT_DEVICE_PATH *DevicePath; EFI_HANDLE Handle; UINT64 RegBase; - CONST INTERRUPT_PROPERTY *InterruptProp; - INT32 SecIntrNum, IntrNum, VirtIntrNum, HypIntrNum; UINT64 FwCfgSelectorAddress; UINT64 FwCfgSelectorSize; UINT64 FwCfgDataAddress; @@ -339,7 +328,7 @@ InitializeVirtFdtDxe ( // TODO use #cells root properties instead // RegProp = fdt_getprop (DeviceTreeBase, Node, "reg", &Len); - ASSERT ((RegProp != NULL) || (PropType == PropertyTypeTimer)); + ASSERT (RegProp != NULL); switch (PropType) { case PropertyTypePciHost: @@ -449,32 +438,6 @@ InitializeVirtFdtDxe ( RtcNode = Node; break; - case PropertyTypeTimer: - // - // - interrupts : Interrupt list for secure, non-secure, virtual and - // hypervisor timers, in that order. - // - InterruptProp = fdt_getprop (DeviceTreeBase, Node, "interrupts", &Len); - ASSERT (Len == 36 || Len == 48); - - SecIntrNum = fdt32_to_cpu (InterruptProp[0].Number) - + (InterruptProp[0].Type ? 16 : 0); - IntrNum = fdt32_to_cpu (InterruptProp[1].Number) - + (InterruptProp[1].Type ? 16 : 0); - VirtIntrNum = fdt32_to_cpu (InterruptProp[2].Number) - + (InterruptProp[2].Type ? 16 : 0); - HypIntrNum = Len < 48 ? 0 : fdt32_to_cpu (InterruptProp[3].Number) - + (InterruptProp[3].Type ? 16 : 0); - - DEBUG ((EFI_D_INFO, "Found Timer interrupts %d, %d, %d, %d\n", - SecIntrNum, IntrNum, VirtIntrNum, HypIntrNum)); - - PcdSet32 (PcdArmArchTimerSecIntrNum, SecIntrNum); - PcdSet32 (PcdArmArchTimerIntrNum, IntrNum); - PcdSet32 (PcdArmArchTimerVirtIntrNum, VirtIntrNum); - PcdSet32 (PcdArmArchTimerHypIntrNum, HypIntrNum); - break; - case PropertyTypeXen: ASSERT (Len == 16); diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf index 5526fd1925..c928e826c2 100644 --- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf +++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf @@ -53,10 +53,6 @@ gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress - gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum - gArmTokenSpaceGuid.PcdArmArchTimerIntrNum - gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum - gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum gArmPlatformTokenSpaceGuid.PcdPL031RtcBase gArmPlatformTokenSpaceGuid.PcdPciBusMin gArmPlatformTokenSpaceGuid.PcdPciBusMax -- cgit v1.2.3