diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2018-05-08 11:18:54 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-06-14 09:25:41 +0000 |
commit | c38960d7f3fd929fa916ac696fcfb8a7b5534c8d (patch) | |
tree | ceb82c1e80e285494cf1f941e87c264707b85809 /src/include | |
parent | 79d26c7a83fd2b14cc9a787e7820824931336d85 (diff) | |
download | coreboot-c38960d7f3fd929fa916ac696fcfb8a7b5534c8d.tar.xz |
lib/device_tree: Add method to get phandle
Add a method to retrieve a node's phandle.
Useful for board specific devicetree manipulations.
Change-Id: I966151ad7e82fc678ab4f56cf9b5868ef39398e0
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/26191
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/device_tree.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/device_tree.h b/src/include/device_tree.h index 107fcf6a48..54aecb98b8 100644 --- a/src/include/device_tree.h +++ b/src/include/device_tree.h @@ -147,6 +147,8 @@ struct device_tree_node *dt_find_next_compat_child(struct device_tree_node *pare // Look up a node relative to a parent node, through its property value. struct device_tree_node *dt_find_prop_value(struct device_tree_node *parent, const char *name, void *data, size_t size); +// Return the phandle +uint32_t dt_get_phandle(struct device_tree_node *node); // Write src into *dest as a 'length'-byte big-endian integer. void dt_write_int(u8 *dest, u64 src, size_t length); // Add different kinds of properties to a node, or update existing ones. |