From patchwork Thu Oct 3 01:35:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 11171983 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 C8C6513BD for ; Thu, 3 Oct 2019 01:36:48 +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 A5352222BE for ; Thu, 3 Oct 2019 01:36:48 +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="UvF14dIH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A5352222BE 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 1iFq1o-0003ZK-S9; Thu, 03 Oct 2019 01:35:36 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iFq1n-0003Z0-MF for xen-devel@lists.xen.org; Thu, 03 Oct 2019 01:35:35 +0000 X-Inumbo-ID: 1574a1ee-e57e-11e9-bf31-bc764e2007e4 Received: from mail.kernel.org (unknown [198.145.29.99]) by localhost (Halon) with ESMTPS id 1574a1ee-e57e-11e9-bf31-bc764e2007e4; Thu, 03 Oct 2019 01:35:30 +0000 (UTC) Received: from sstabellini-ThinkPad-T480s.hsd1.ca.comcast.net (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 7BF1A222C3; Thu, 3 Oct 2019 01:35:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570066529; bh=oioZ80YmDh5BZ2RY3omy5UQgF74fXkxFb7JblL6TNrM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UvF14dIHD06P69YGcCoVTsWay6B9NZjuwjZYD0YTs/Bk9Bd4zV9wy4Xvwn7IboEmp gxkBQIhsLTb3fE24ZHWAzX9nJ2j3w2y7COy+C+NCu2pEmeO2P/UDm2zlRmYdq3E6sS siAFVfl2joDkLWeT8IOmnmVcjzFlNk+epUoxR/k0= From: Stefano Stabellini To: julien.grall@arm.com Date: Wed, 2 Oct 2019 18:35:20 -0700 Message-Id: <20191003013526.30768-2-sstabellini@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Subject: [Xen-devel] [PATCH v8 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 Acked-by: Julien Grall --- Changes in v5: - move declarations to xen/include/asm-arm/setup.h Changes in v4: - new patch --- xen/arch/arm/bootfdt.c | 8 ++++---- xen/include/asm-arm/setup.h | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c index 623173bc7f..a7810abb15 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/asm-arm/setup.h b/xen/include/asm-arm/setup.h index efcba545c2..fa0a8721b2 100644 --- a/xen/include/asm-arm/setup.h +++ b/xen/include/asm-arm/setup.h @@ -115,6 +115,12 @@ const char *boot_module_kind_as_string(bootmodule_kind kind); extern uint32_t hyp_traps_vector[]; void init_traps(void); +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); + #endif /* * Local variables: