Commit 5f7bfdd63094689af501fdef77423e0029c06622

Authored by Simon Glass
1 parent 20806e7484

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

... ... @@ -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
... ... @@ -918,7 +918,7 @@
918 918 return 0;
919 919 }
920 920  
921   -static u64 fdtdec_get_number(const fdt32_t *ptr, unsigned int cells)
  921 +u64 fdtdec_get_number(const fdt32_t *ptr, unsigned int cells)
922 922 {
923 923 u64 number = 0;
924 924