summaryrefslogtreecommitdiff
path: root/include/fdtdec.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2021-09-03 15:16:18 +0200
committerTom Warren <twarren@nvidia.com>2021-10-13 14:18:30 -0700
commit4bf88ba76abb224b3ca258a2f502384ec6c86bd6 (patch)
tree74ac3ca45b7a69addd61faf887b20a175e92aa16 /include/fdtdec.h
parentd5598cfa9bcab50812b2b416af91c2a37be67531 (diff)
fdtdec: Support retrieving the name of a carveout
When retrieving a given carveout for a device, allow callers to query the name. This helps differentiating between carveouts when there are more than one. This is also useful when copying carveouts to help assign a meaningful name that cannot always be guessed. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'include/fdtdec.h')
-rw-r--r--include/fdtdec.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 23efbe710c..f961f03012 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -1038,14 +1038,16 @@ int fdtdec_add_reserved_memory(void *blob, const char *basename,
*
* @param blob FDT blob
* @param node name of a node
- * @param name name of the property in the given node that contains
+ * @param prop_name name of the property in the given node that contains
* the phandle for the carveout
* @param index index of the phandle for which to read the carveout
* @param carveout return location for the carveout information
+ * @param name return location for the carveout name
* @return 0 on success or a negative error code on failure
*/
-int fdtdec_get_carveout(const void *blob, const char *node, const char *name,
- unsigned int index, struct fdt_memory *carveout);
+int fdtdec_get_carveout(const void *blob, const char *node,
+ const char *prop_name, unsigned int index,
+ struct fdt_memory *carveout, const char **name);
/**
* fdtdec_set_carveout() - sets a carveout region for a given node