diff mbox series

[v4,2/8] xen/arm: export device_tree_get_reg and device_tree_get_u32

Message ID 20190821035315.12812-2-sstabellini@kernel.org (mailing list archive)
State Superseded
Headers show
Series [v4,1/8] xen/arm: introduce handle_device_interrupts | expand

Commit Message

Stefano Stabellini Aug. 21, 2019, 3:53 a.m. UTC
They'll be used in later patches.

Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>

---
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(-)

Comments

Julien Grall Sept. 10, 2019, 8:53 p.m. UTC | #1
Hi,

On 8/21/19 4:53 AM, Stefano Stabellini wrote:
> They'll be used in later patches.
> 
> Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
> 
> ---
> Changes in v4:
> - new patch
> ---
>   xen/arch/arm/bootfdt.c        | 8 ++++----
>   xen/include/xen/device_tree.h | 6 ++++++

device_tree.h is a common header that describe all the function 
implemented by common/device_tree.c.

Most likely you want to declare the prototype in asm-arm/setup.h as this 
is done for all the others function exported in bootfdt.c.

Cheers,
Stefano Stabellini Sept. 24, 2019, 4:29 p.m. UTC | #2
On Tue, 10 Sep 2019, Julien Grall wrote:
> Hi,
> 
> On 8/21/19 4:53 AM, Stefano Stabellini wrote:
> > They'll be used in later patches.
> > 
> > Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
> > 
> > ---
> > Changes in v4:
> > - new patch
> > ---
> >   xen/arch/arm/bootfdt.c        | 8 ++++----
> >   xen/include/xen/device_tree.h | 6 ++++++
> 
> device_tree.h is a common header that describe all the function implemented by
> common/device_tree.c.
> 
> Most likely you want to declare the prototype in asm-arm/setup.h as this is
> done for all the others function exported in bootfdt.c.
 
I'll do that
diff mbox series

Patch

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
  *