From patchwork Fri Apr 8 09:45:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65382 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp569469lbl; Fri, 8 Apr 2016 02:46:25 -0700 (PDT) X-Received: by 10.66.123.105 with SMTP id lz9mr11484732pab.37.1460108772799; Fri, 08 Apr 2016 02:46:12 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id rx5si13478pab.151.2016.04.08.02.46.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Apr 2016 02:46:12 -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 D78C91A1FB2; Fri, 8 Apr 2016 02:45:48 -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 7607E1A1F4B for ; Fri, 8 Apr 2016 02:45:47 -0700 (PDT) Received: by mail-wm0-x22e.google.com with SMTP id v188so12594300wme.1 for ; Fri, 08 Apr 2016 02:45:47 -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=WXp7ucx0VYDh58EDi4UQUUGPrpWshSheNqNV9guGujM=; b=g37drwCabaYOFwBBmjOLwJA4Gc4fj+ULmQ1triUPQ6z+UZLDGOiuir6YvKGWV0s35i vMUkN52Nm9syMU/tDISHzuqkOIqCaOlsx4GEu/ysQ9RaiQGPjEfL059wjAZ3FiYkEVJ0 McN2RnpdlMCmOkngbNhCMFNL31LapDH1lPcvk= 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=WXp7ucx0VYDh58EDi4UQUUGPrpWshSheNqNV9guGujM=; b=ie15IDQ5TMhhT8l7WGovfhLI6EdqK1Q7RAMlnBQMz92dBMziyRnqPgKGNDDpsFOj6P RclVsqNOwqKXMgPwA4GthVYOqZSVWYgpbQ87ZB0ZPPiYUm4jM6Horv+A/0wX7EqRr7NZ WDPKH4GTgUuZ5HMJPhHf0OWRBPBfoNggk09GMurN/SQm40Zd/VwxpMnTL0+NE0SqmB4p 01xZpR6NFOnoLS4Fejembfesks2Et1+mc8AdVbbok/MNyrBZ8rfjrWax93G8DwaodmMe 4W7CTr7p0ogeqWSo9xEK5cu7YLxhuYzFS7AfehphVdD3RkfGbWH5hVduIt7AwOTivIal 8v5A== X-Gm-Message-State: AD7BkJKWlfI1+UDECGey0JJn27esP9Ia1A/6585kYvFF05rGErDbSsrFwrSRMT580bLF1AaI X-Received: by 10.194.121.70 with SMTP id li6mr8333825wjb.164.1460108746183; Fri, 08 Apr 2016 02:45:46 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id s10sm9710681wjp.3.2016.04.08.02.45.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Apr 2016 02:45:45 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Fri, 8 Apr 2016 11:45:05 +0200 Message-Id: <1460108711-12122-19-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 18/24] 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 | 29 +------------------- ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf | 3 -- 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.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; } 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