summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-03-05 12:25:14 -0700
committerSimon Glass <sjg@chromium.org>2015-04-16 19:27:41 -0600
commit5f7bfdd63094689af501fdef77423e0029c06622 (patch)
tree1b2fde76cfdacc4e482602e369061a542dbf87e8 /include
parent20806e748434282af44722ad8b7afbbcf2d54ff4 (diff)
fdt: Export fdtdec_get_number() for general use
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>
Diffstat (limited to 'include')
-rw-r--r--include/fdtdec.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 11a7b86007..967fa88f9e 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -389,6 +389,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