From patchwork Wed Apr 13 14:32:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65729 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp44978qge; Wed, 13 Apr 2016 07:32:30 -0700 (PDT) X-Received: by 10.66.124.226 with SMTP id ml2mr13296713pab.90.1460557950770; Wed, 13 Apr 2016 07:32:30 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id ku9si7842231pab.99.2016.04.13.07.32.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Apr 2016 07:32:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; 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 2001:19d0:306:5::1 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 D00061A220E; Wed, 13 Apr 2016 07:32:29 -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 1D3E11A220E for ; Wed, 13 Apr 2016 07:32:28 -0700 (PDT) Received: by mail-wm0-x236.google.com with SMTP id n3so81980970wmn.0 for ; Wed, 13 Apr 2016 07:32:28 -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=QucJzHTNdmVX+Ho7S15+1AAzG6D+Qgk7qk7GPNJwX64=; b=NzyqCrB6E3m0NPjh6qC6hgEdthUC7SgZYW3a9vUzXpcsRY47agcaAxBbMbte79kihS jknCotDyLGTpIcweTiAEmP718Fwk2NNpklupufzKPLgNt2+nUZ4l0jg6VKjZ+5p6TzQX wXUYoPe829HlmOm8n9RRMdA6PCqXm56zHiFck= 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=QucJzHTNdmVX+Ho7S15+1AAzG6D+Qgk7qk7GPNJwX64=; b=UdwnyTwD+TXwBBk59OiMt/PSA3mN9b+od0jeQepfhJiZYoGusDadVG5nQCZTi8t/4Y 0uJfN3AML4f3fzPd5T2S7pRVnLQhKtvIpsHC5zVfBs6zLgM8rsQE5w2MQBJn7941++4J HcHDQ5jBvKMTOlJMMr4Ihd0KQ7S7Yk8KbH3ssVmOoFCJvL+7Vhg1lEIjjEQTaYsb+Om0 dB69tG1yO++ZdKibZ3285SLytQPwl2nVG2XSk4btM2Kzjb9zJmIV0mccWadlaU1GJHI0 T+52D9TDqmRRhX2qqkuTXOpM1TphxB5zIl0L8wc5uldcsGpv6WP5XHNFGQMjNxDWGtm3 A/Og== X-Gm-Message-State: AOPr4FXZuTcHgtSXrvt1pQrrqL16LP0+WYBcOdRzXyhlOYWsjPqo0ky0Y4jBL6ts79vG42aE X-Received: by 10.194.82.199 with SMTP id k7mr9927702wjy.63.1460557946328; Wed, 13 Apr 2016 07:32:26 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id 188sm1589444wmk.6.2016.04.13.07.32.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Apr 2016 07:32:25 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Wed, 13 Apr 2016 16:32:07 +0200 Message-Id: <1460557933-23346-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1460557933-23346-1-git-send-email-ard.biesheuvel@linaro.org> References: <1460557933-23346-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v4 3/9] ArmVirtPkg/VirtFdtDxe: drop RTC 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 RTC driver no longer relies on VirtFdtDxe to set the pl031 RTC base address in a dynamic PCD, so drop the handling altogether. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf | 3 -- ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c | 29 +------------------- 2 files changed, 1 insertion(+), 31 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.inf b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf index 8ebce337747f..8c098e5885ae 100644 --- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf +++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf @@ -49,9 +49,6 @@ [Guids] gVirtioMmioTransportGuid gFdtHobGuid -[Pcd] - gArmPlatformTokenSpaceGuid.PcdPL031RtcBase - [FeaturePcd] gArmVirtTokenSpaceGuid.PcdPureAcpiBoot diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c index 31e0ca7db8b4..4fca50a6b347 100644 --- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c +++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c @@ -42,7 +42,6 @@ typedef struct { typedef enum { PropertyTypeUnknown, - PropertyTypeRtc, PropertyTypeVirtio, PropertyTypeUart, PropertyTypeXen, @@ -54,7 +53,6 @@ typedef struct { } PROPERTY; STATIC CONST PROPERTY CompatibleProperties[] = { - { PropertyTypeRtc, "arm,pl031" }, { PropertyTypeVirtio, "virtio,mmio" }, { PropertyTypeUart, "arm,pl011" }, { PropertyTypeXen, "xen,xen" }, @@ -96,7 +94,6 @@ InitializeVirtFdtDxe ( VOID *Hob; VOID *DeviceTreeBase; INT32 Node, Prev; - INT32 RtcNode; EFI_STATUS Status; CONST CHAR8 *Type; INT32 Len; @@ -119,7 +116,6 @@ InitializeVirtFdtDxe ( DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, DeviceTreeBase)); - RtcNode = -1; // // Now enumerate the nodes and install peripherals that we are interested in, // i.e., GIC, RTC and virtio MMIO nodes @@ -196,18 +192,6 @@ InitializeVirtFdtDxe ( } break; - case PropertyTypeRtc: - ASSERT (Len == 16); - - RegBase = fdt64_to_cpu (((UINT64 *)RegProp)[0]); - ASSERT (RegBase < MAX_UINT32); - - PcdSet32 (PcdPL031RtcBase, (UINT32)RegBase); - - DEBUG ((EFI_D_INFO, "Found PL031 RTC @ 0x%Lx\n", RegBase)); - RtcNode = Node; - break; - case PropertyTypeXen: ASSERT (Len == 16); @@ -240,18 +224,7 @@ InitializeVirtFdtDxe ( // Status = gBS->InstallConfigurationTable (&gFdtTableGuid, DeviceTreeBase); ASSERT_EFI_ERROR (Status); - - // - // UEFI takes ownership of the RTC hardware, and exposes its functionality - // through the UEFI Runtime Services GetTime, SetTime, etc. This means we - // need to disable it in the device tree to prevent the OS from attaching its - // device driver as well. - // - if ((RtcNode != -1) && - fdt_setprop_string (DeviceTreeBase, RtcNode, "status", - "disabled") != 0) { - DEBUG ((EFI_D_WARN, "Failed to set PL031 status to 'disabled'\n")); - } } + return EFI_SUCCESS; }