From patchwork Wed Aug 21 03:53:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 11105347 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5E5ED1805 for ; Wed, 21 Aug 2019 03:55:22 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3AFCE22CF7 for ; Wed, 21 Aug 2019 03:55:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="XmPmx8yw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AFCE22CF7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i0HgX-0007XJ-WB; Wed, 21 Aug 2019 03:53:21 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i0HgW-0007X7-4G for xen-devel@lists.xen.org; Wed, 21 Aug 2019 03:53:20 +0000 X-Inumbo-ID: 36123bba-c3c7-11e9-ac23-bc764e2007e4 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 36123bba-c3c7-11e9-ac23-bc764e2007e4; Wed, 21 Aug 2019 03:53:19 +0000 (UTC) Received: from localhost.localdomain (c-67-164-102-47.hsd1.ca.comcast.net [67.164.102.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C44552332B; Wed, 21 Aug 2019 03:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566359598; bh=SNGQV1FRvvnk1EbxM0rXZvy7bRJiTL03suL/GJScJ0A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XmPmx8yw3Vzss0+vBBhVqr1czSpPbcwZquoS2Fm25YcMiCCHgp5Zlx0M8BnOoG4w4 bkAQkSV4NKMpJsMfn/B62cBD/n6iwSSxY+K5W2V/IldPPHJNwY/yNFPFznjN1N14zD 1BCXr8sxZnl7DJDO4GkHf7pmPxuIZ+6a+ZoKHeCM= From: Stefano Stabellini To: julien.grall@arm.com Date: Tue, 20 Aug 2019 20:53:09 -0700 Message-Id: <20190821035315.12812-2-sstabellini@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Subject: [Xen-devel] [PATCH v4 2/8] xen/arm: export device_tree_get_reg and device_tree_get_u32 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , sstabellini@kernel.org, andrii_anisov@epam.com, Achin.Gupta@arm.com, xen-devel@lists.xen.org, Volodymyr_Babchuk@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" They'll be used in later patches. Signed-off-by: Stefano Stabellini --- Changes in v4: - new patch --- xen/arch/arm/bootfdt.c | 8 ++++---- xen/include/xen/device_tree.h | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c index 891b4b66ff..4b7898be13 100644 --- a/xen/arch/arm/bootfdt.c +++ b/xen/arch/arm/bootfdt.c @@ -55,15 +55,15 @@ static bool __init device_tree_node_compatible(const void *fdt, int node, return false; } -static void __init device_tree_get_reg(const __be32 **cell, u32 address_cells, - u32 size_cells, u64 *start, u64 *size) +void __init device_tree_get_reg(const __be32 **cell, u32 address_cells, + u32 size_cells, u64 *start, u64 *size) { *start = dt_next_cell(address_cells, cell); *size = dt_next_cell(size_cells, cell); } -static u32 __init device_tree_get_u32(const void *fdt, int node, - const char *prop_name, u32 dflt) +u32 __init device_tree_get_u32(const void *fdt, int node, + const char *prop_name, u32 dflt) { const struct fdt_property *prop; diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index 83156297e2..4510d9b580 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -162,6 +162,12 @@ int device_tree_for_each_node(const void *fdt, device_tree_node_func func, void *data); +void device_tree_get_reg(const __be32 **cell, u32 address_cells, + u32 size_cells, u64 *start, u64 *size); + +u32 device_tree_get_u32(const void *fdt, int node, + const char *prop_name, u32 dflt); + /** * dt_unflatten_host_device_tree - Unflatten the host device tree *