From patchwork Wed Apr 13 08:02:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65684 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2362670qge; Wed, 13 Apr 2016 01:02:34 -0700 (PDT) X-Received: by 10.66.63.104 with SMTP id f8mr10963567pas.109.1460534554697; Wed, 13 Apr 2016 01:02:34 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id 14si14847771pfp.31.2016.04.13.01.02.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Apr 2016 01:02:34 -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 7FF361A2122; Wed, 13 Apr 2016 01:02:33 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (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 453191A2122 for ; Wed, 13 Apr 2016 01:02:31 -0700 (PDT) Received: by mail-wm0-x22c.google.com with SMTP id v188so159429124wme.1 for ; Wed, 13 Apr 2016 01:02:31 -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=NMAfC4zcyKoWqt7v8iEwIyDhqbkbC5r7/nEZsh5stlE=; b=QFgPH50yM/0znDBId7qTe3U3NOVuM1c+j9fbVO6eleSdEmUVaR5SvuaCxtD1nvTOPv wq0GOMMrAJEw0y1MTh1K5HDjcR4bizYRwyJS/RtBTYbXfCmQf4C1NSeHUyNPPqCtZs3I 742jyDKN/O9r8jl3SynsNO11uwwxFweejluN4= 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=NMAfC4zcyKoWqt7v8iEwIyDhqbkbC5r7/nEZsh5stlE=; b=l2Wl7BIl/M7NwmwRB0j5UkbKdDEPYKwL8k/LLyBL90r3zvytQ/t93st1OIbHmRxDqt zcm1aEbpu2RaMJnvEWUfX6UjInJKEMP3fEhO7Kz4K6CCnSMH6tyVUwQQSGPzbtykHFwJ YCUVlhJpW48TIRkCNLv06Etb4Tej0Ep/B/f7Q+FHiuY2Jzagpz6E2mG3cSBp0bNYbPVb EkCzIfHxAXw9YOCC194boF3fjwIzj6AxXN7MPfno60vG6CiqBHGHYUuZSKV5DkQ/fkTS c8hIO+FtiGPByWyVoIc5VMW/ewsgFUEvEZV7MIj3/HTd7PQfepK3R/6LiKCfIM1kwPpU ozxQ== X-Gm-Message-State: AOPr4FVra3GGg2EjpoyGSFJr2QOO68I2PATvY0/z+cArUPodvHFqFG0GPnPbZAU6+qnAbRFc X-Received: by 10.28.11.133 with SMTP id 127mr14533776wml.32.1460534549790; Wed, 13 Apr 2016 01:02:29 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id i206sm26686549wmf.1.2016.04.13.01.02.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Apr 2016 01:02:29 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Wed, 13 Apr 2016 10:02:13 +0200 Message-Id: <1460534539-2169-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1460534539-2169-1-git-send-email-ard.biesheuvel@linaro.org> References: <1460534539-2169-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v3 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 --- 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 Reviewed-by: Laszlo Ersek 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; }