From patchwork Mon Sep 30 23:28:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 11167861 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 DDA6C14DB for ; Mon, 30 Sep 2019 23:30:26 +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 B8E0520815 for ; Mon, 30 Sep 2019 23:30:26 +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="q2gpZonh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B8E0520815 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 1iF56Q-0000im-RG; Mon, 30 Sep 2019 23:29:14 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iF56O-0000iM-QZ for xen-devel@lists.xen.org; Mon, 30 Sep 2019 23:29:12 +0000 X-Inumbo-ID: 1bc7b338-e3da-11e9-96ea-12813bfff9fa Received: from mail.kernel.org (unknown [198.145.29.99]) by localhost (Halon) with ESMTPS id 1bc7b338-e3da-11e9-96ea-12813bfff9fa; Mon, 30 Sep 2019 23:29:12 +0000 (UTC) Received: from sstabellini-ThinkPad-T480s.xilinx.com (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 7320A2168B; Mon, 30 Sep 2019 23:29:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569886151; bh=oioZ80YmDh5BZ2RY3omy5UQgF74fXkxFb7JblL6TNrM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q2gpZonhykhB2xuqhR4BF2SPBkS5tPY6wnaJyQ4R1OfSYA7YeOMtichEU4aTUY7m+ dJrcQudQ3e3rn7r+qbz4Eyz7YdflKA4RCMYbr/tuXfFA5VxQTZHyWb+9Qu0xxPE3Je jv8o8idS6qxBPQJmhPV7S5ZbXnhnFoR9mGjsGQjc= From: Stefano Stabellini To: julien.grall@arm.com Date: Mon, 30 Sep 2019 16:28:43 -0700 Message-Id: <20190930232849.1820-2-sstabellini@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Subject: [Xen-devel] [PATCH v7a 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: