From patchwork Wed Apr 6 16:15:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65201 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1147198lbc; Wed, 6 Apr 2016 09:16:08 -0700 (PDT) X-Received: by 10.98.17.78 with SMTP id z75mr40159948pfi.40.1459959367054; Wed, 06 Apr 2016 09:16:07 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id dt12si5510249pac.0.2016.04.06.09.16.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Apr 2016 09:16:07 -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 C1BD01A1FD5; Wed, 6 Apr 2016 09:15:50 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (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 A141D1A1FD5 for ; Wed, 6 Apr 2016 09:15:49 -0700 (PDT) Received: by mail-wm0-x236.google.com with SMTP id l6so72244192wml.1 for ; Wed, 06 Apr 2016 09:15:49 -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=ZLfG4Ni8OoDM1DH2jwpA2v6y63wumxu6+Z8FnvvU1eL0NCetvJVsSCjTrOYbzdVtEb dtgJMg/FoBknZYrV12mq68iWS0nCHGlt1i63ARDoTITq6yKd4y+YNHOoYq15TNE6elAC V8ExbMP9/WqGY3EIKHnNfGv2f/NtcB2fc5fQU= 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=Dym/doR40BseY6J08aEnxmyKA4uJni9twfGL4p2zYpOIQFqqL0Q/nT6hflX8vaz8Od e1vDQxGVT2Drron2qop8ONNstUxeH51SDChoNWDwQs0m+gOO2+sDjvBZ2qkdCyBwnAyq Ljk8vnGyWEk8rvl/7Pz5tiaWKNAeRfuCpqnXmRpJQMFXjQ9/roLVgYYorwsq8Ys0XaJM FWQzk4oS0vJ5wKfE63MW5iLQNcDXhy3WAS+7HAQftBPaOpPPNyCKGM+czquNXYxnraG8 F+I3jrwxTLy/pyCrIcLhhwnOmzzeBoki1F46PgJrbRejN8uXDfoBvmar0NHhFF2t+LDV u5xg== X-Gm-Message-State: AD7BkJJjUsQhBy3Ttfq9L+8RZgTUlkuTiqMJL+DJTuxvzktqDtRZKO/S4OBH8AElBuMB+Tai X-Received: by 10.28.150.195 with SMTP id y186mr24440646wmd.43.1459959348308; Wed, 06 Apr 2016 09:15:48 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id om6sm3961219wjc.40.2016.04.06.09.15.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Apr 2016 09:15:47 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Wed, 6 Apr 2016 18:15:10 +0200 Message-Id: <1459959319-19293-13-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459959319-19293-1-git-send-email-ard.biesheuvel@linaro.org> References: <1459959319-19293-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 12/21] 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 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