This function is missing a prototype but is more widey useful. Add it.

Signed-off-by: Simon Glass <s...@chromium.org>
---

 include/fdtdec.h | 11 +++++++++++
 lib/fdtdec.c     |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/include/fdtdec.h b/include/fdtdec.h
index 1bc70db..2a96a0a 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -385,6 +385,17 @@ s32 fdtdec_get_int(const void *blob, int node, const char 
*prop_name,
                s32 default_val);
 
 /**
+ * Get a variable-sized number from a property
+ *
+ * This reads a number from one or more cells.
+ *
+ * @param ptr  Pointer to property
+ * @param cells        Number of cells containing the number
+ * @return the value in the cells
+ */
+u64 fdtdec_get_number(const fdt32_t *ptr, unsigned int cells);
+
+/**
  * Look up a 64-bit integer property in a node and return it. The property
  * must have at least 8 bytes of data (2 cells). The first two cells are
  * concatenated to form a 8 bytes value, where the first cell is top half and
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index dd58bbb..d4bc8b4 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -917,7 +917,7 @@ int fdtdec_read_fmap_entry(const void *blob, int node, 
const char *name,
        return 0;
 }
 
-static u64 fdtdec_get_number(const fdt32_t *ptr, unsigned int cells)
+u64 fdtdec_get_number(const fdt32_t *ptr, unsigned int cells)
 {
        u64 number = 0;
 
-- 
2.2.0.rc0.207.ga3a616c

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to