Commit 5f7bfdd63094689af501fdef77423e0029c06622
1 parent
20806e7484
Exists in
v2017.01-smarct4x
and in
34 other branches
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>
Showing 2 changed files with 12 additions and 1 deletions Side-by-side Diff
include/fdtdec.h
... | ... | @@ -389,6 +389,17 @@ |
389 | 389 | s32 default_val); |
390 | 390 | |
391 | 391 | /** |
392 | + * Get a variable-sized number from a property | |
393 | + * | |
394 | + * This reads a number from one or more cells. | |
395 | + * | |
396 | + * @param ptr Pointer to property | |
397 | + * @param cells Number of cells containing the number | |
398 | + * @return the value in the cells | |
399 | + */ | |
400 | +u64 fdtdec_get_number(const fdt32_t *ptr, unsigned int cells); | |
401 | + | |
402 | +/** | |
392 | 403 | * Look up a 64-bit integer property in a node and return it. The property |
393 | 404 | * must have at least 8 bytes of data (2 cells). The first two cells are |
394 | 405 | * concatenated to form a 8 bytes value, where the first cell is top half and |