From patchwork Fri Apr 8 09:44:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65374 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp569267lbl; Fri, 8 Apr 2016 02:45:51 -0700 (PDT) X-Received: by 10.98.7.24 with SMTP id b24mr11239402pfd.125.1460108744787; Fri, 08 Apr 2016 02:45:44 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id xk1si15108pab.132.2016.04.08.02.45.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Apr 2016 02:45:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D44EA1A1FC8; Fri, 8 Apr 2016 02:45:36 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5966C1A1EA0 for ; Fri, 8 Apr 2016 02:45:35 -0700 (PDT) Received: by mail-wm0-x233.google.com with SMTP id l6so57636940wml.1 for ; Fri, 08 Apr 2016 02:45:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ww9UNyUi65ftrVNz1yTMBwr/OKbnuru0SvDrTxfvVUg=; b=bY6YkhbJpR39ciTFeURe9omPm1rSi4Bepr3O648QFtqLSK2tYGyDT5R/JLkt47lygg lm623rHAA3XN/aKpC0OLSrrTRfPnq+Cg0+zcFZ2GW5dSsvpDALN6QSkTjC1djBzjGFWq ydr9NaxBQeEd3vn4OYAg0Wi/bQyaCfAeFlQoY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ww9UNyUi65ftrVNz1yTMBwr/OKbnuru0SvDrTxfvVUg=; b=MwBCz5Upb4IePcAaZOTpbCwfK2OEMI2xXvrQk4VZGCS8Dlt4YI2n1Vo+ZTzuXpWmUH Vbm+TC8i/Jkg6sofGnLbrl3Qh7lRRh66avMT+0XRD/6S7b0ro+9/xraQ0pb2TCPxL+CF S6ywfcnqA+FcNPuI7TxTspYZ1Sm905OcKRlUbMvjkKoCrT780vPXjd5/ckjttHUg2dYj EvlvlJsJ59JkF1xIYiJeCi7AUc/vwVSWjjPGrP+Nm46rD+SZC/x+s/I1CeNp2W0NjRzj umPNZoTXJirB3Sercn1tjHrHG6Reg3o2mxhF8upcMQ2K5QrXqKIPhmfCntut+1bl5eBm nzfA== X-Gm-Message-State: AD7BkJLcNFhQetp5Q+BQu9fgZpm2fFoNbYmzpKSyZ93iuf+M9ad0nc5pDTUm6fm8RmWhr7dJ X-Received: by 10.28.136.211 with SMTP id k202mr2806904wmd.93.1460108733952; Fri, 08 Apr 2016 02:45:33 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id s10sm9710681wjp.3.2016.04.08.02.45.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Apr 2016 02:45:33 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Fri, 8 Apr 2016 11:44:57 +0200 Message-Id: <1460108711-12122-11-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1460108711-12122-1-git-send-email-ard.biesheuvel@linaro.org> References: <1460108711-12122-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 10/24] ArmVirtPkg/VirtFdtDxe: remove timer DT node handling X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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 --- ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c | 39 +------------------- ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf | 4 -- 2 files changed, 1 insertion(+), 42 deletions(-) -- 2.5.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c index 4a4713cf6ad8..368618956be1 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 5526fd19250e..c928e826c258 100644 --- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf +++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf @@ -53,10 +53,6 @@ [Pcd] gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress - gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum - gArmTokenSpaceGuid.PcdArmArchTimerIntrNum - gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum - gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum gArmPlatformTokenSpaceGuid.PcdPL031RtcBase gArmPlatformTokenSpaceGuid.PcdPciBusMin gArmPlatformTokenSpaceGuid.PcdPciBusMax