diff options
author | Simon Glass <sjg@chromium.org> | 2015-10-17 19:41:14 -0600 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2015-11-04 14:49:51 +0100 |
commit | 3bc37a50e0db9978c6fbb1b2b6c3a351cebe631e (patch) | |
tree | f8a7b3409e4da684b0f394eaac2b89d49c444d33 /include/fdtdec.h | |
parent | 44303dfa792b0a4f81d6f6a719467db9a20063b5 (diff) | |
download | u-boot-imx-3bc37a50e0db9978c6fbb1b2b6c3a351cebe631e.zip u-boot-imx-3bc37a50e0db9978c6fbb1b2b6c3a351cebe631e.tar.gz u-boot-imx-3bc37a50e0db9978c6fbb1b2b6c3a351cebe631e.tar.bz2 |
fdt: Add a function to look up a /chosen property
It is sometimes useful to find a property in the chosen node. Add a function
for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'include/fdtdec.h')
-rw-r--r-- | include/fdtdec.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h index 2de6dda..9fcc7a1 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -628,7 +628,16 @@ int fdtdec_get_alias_seq(const void *blob, const char *base, int node, int *seqp); /** - * Get the offset of the given chosen node + * Get a property from the /chosen node + * + * @param blob Device tree blob (if NULL, then NULL is returned) + * @param name Property name to look up + * @return Value of property, or NULL if it does not exist + */ +const char *fdtdec_get_chosen_prop(const void *blob, const char *name); + +/** + * Get the offset of the given /chosen node * * This looks up a property in /chosen containing the path to another node, * then finds the offset of that node. |