From patchwork Wed Apr 6 16:15:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65209 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1147522lbc; Wed, 6 Apr 2016 09:16:40 -0700 (PDT) X-Received: by 10.66.168.177 with SMTP id zx17mr30617600pab.3.1459959398942; Wed, 06 Apr 2016 09:16:38 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id s11si5483663pfi.95.2016.04.06.09.16.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Apr 2016 09:16:38 -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 ACAA11A1FF1; Wed, 6 Apr 2016 09:16:02 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (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 C46491A1FF0 for ; Wed, 6 Apr 2016 09:16:01 -0700 (PDT) Received: by mail-wm0-x22e.google.com with SMTP id 191so63907131wmq.0 for ; Wed, 06 Apr 2016 09:16:01 -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=ngWW/58eaxoYcGFqgCBJ9pljlpSZGvbqM96vBr7YTrI=; b=cAvzdbNIL5UiHT42+8GzRXD/VtfDyux9M0z3do5me77NDckRGfEdJjnlkMUJE0IHwo dFYLSY+OBlX3dyE1lG/267Zi53eqEgJwC3ZalEkvy/fUVkFCC7/FASK7NEBfDS752bhh WR5QhoXXsnzVAGlkPv7u3muH8xl2xzY1lpP+A= 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=ngWW/58eaxoYcGFqgCBJ9pljlpSZGvbqM96vBr7YTrI=; b=Gk0GYdSaU3SUmCuyCYXqsRzT7ihaTnh7+qzcP2f2XsTuWyl4XiyivjiDjybylFF822 vUeUpzOa8glQpHgbyeQEoiOJPOxRhoGx5A03haVxWh8cWcgTXWPFVGMHfQz3YyvvTOUo mCmY14tj6psmh67SPrVnd/RFyhJ3piUXkPZ+gszth5ewhPy5g9qf6Um4dku5LSjScYxe UoiE8YWSKv0y6BWyefnMVOO2p/ytThQ/vdXFeJlRm/aRWOu7wlOpSJq7/B078CgUmJM4 rDz0NBBFNdYvpueZvnOr2OiUcoQB1+Bd1jpQH5psOcgjOHMJNnKhgBtrTPGAf/N8XM6t 5GIQ== X-Gm-Message-State: AD7BkJJfxQsRTXp4jcqxVaiYne1H4Ff+KVVNJziwqxjwpyBvDvkKSOiZSWm6AaeU755NCBfP X-Received: by 10.28.24.130 with SMTP id 124mr25063736wmy.50.1459959360470; Wed, 06 Apr 2016 09:16:00 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id om6sm3961219wjc.40.2016.04.06.09.15.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Apr 2016 09:15:59 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Wed, 6 Apr 2016 18:15:18 +0200 Message-Id: <1459959319-19293-21-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 20/21] 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 --- ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c | 36 -------------------- ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf | 6 ---- 2 files changed, 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 31e0ca7db8b4..0eb4932606ea 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); @@ -233,25 +217,5 @@ InitializeVirtFdtDxe ( } } - if (!FeaturePcdGet (PcdPureAcpiBoot)) { - // - // Only install the FDT as a configuration table if we want to leave it up - // to the OS to decide whether it prefers ACPI over DT. - // - 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; } diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf index 8ebce337747f..dcad1e085e5b 100644 --- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf +++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf @@ -49,12 +49,6 @@ [Guids] gVirtioMmioTransportGuid gFdtHobGuid -[Pcd] - gArmPlatformTokenSpaceGuid.PcdPL031RtcBase - -[FeaturePcd] - gArmVirtTokenSpaceGuid.PcdPureAcpiBoot - [Protocols] gEfiDevicePathProtocolGuid