diff options
author | Che-Liang Chiou <clchiou@chromium.org> | 2012-10-25 16:31:05 +0000 |
---|---|---|
committer | Gerald Van Baren <gvb@unssw.com> | 2012-11-12 23:14:57 -0500 |
commit | aadef0a1bc3db81708471c9d18eb6c756659196f (patch) | |
tree | a08327dfcaab8d16aec6d534164ee526419f002b /include/fdtdec.h | |
parent | 79289c0b5ff4a8c7869d7ca629cddc660dd06095 (diff) |
fdt: Add fdtdec_get_uint64 to decode a 64-bit value from a property
It decodes a 64-bit value from a property that is at least 8 bytes long.
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/fdtdec.h')
-rw-r--r-- | include/fdtdec.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h index a37cf54a935..b5d7d2f54a2 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -182,6 +182,21 @@ s32 fdtdec_get_int(const void *blob, int node, const char *prop_name, s32 default_val); /** + * 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 + * the second cell is bottom half. + * + * @param blob FDT blob + * @param node node to examine + * @param prop_name name of property to find + * @param default_val default value to return if the property is not found + * @return integer value, if found, or default_val if not + */ +uint64_t fdtdec_get_uint64(const void *blob, int node, const char *prop_name, + uint64_t default_val); + +/** * Checks whether a node is enabled. * This looks for a 'status' property. If this exists, then returns 1 if * the status is 'ok' and 0 otherwise. If there is no status property, |