]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
fdt: Export fdtdec_get_number() for general use
authorSimon Glass <sjg@chromium.org>
Thu, 5 Mar 2015 19:25:14 +0000 (12:25 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 19:47:22 +0000 (21:47 +0200)
This function is missing a prototype but is more widey useful. Add it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
include/fdtdec.h
lib/fdtdec.c

index 11a7b86007e6613e61efff0d7cdef07be0aabe3e..967fa88f9ec1d53352c7eb940c43ad26ad941baa 100644 (file)
@@ -388,6 +388,17 @@ int fdtdec_get_pci_bar32(const void *blob, int node,
 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
index 1a0268a3f9f57e8c492495eb50abc1d8ca0e4500..915fe2444a80c56837532a0ab2289ace8f935f51 100644 (file)
@@ -918,7 +918,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;