diff options
author | Alexander Graf <agraf@suse.de> | 2012-05-17 16:58:55 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-06-24 01:04:46 +0200 |
commit | 3601b572820ee5f3676ab24c068a4e011b72236d (patch) | |
tree | f8938085fbe4531baca75a487b6ff76c59b2f539 /device_tree.h | |
parent | ce36252cc1711a5e222ed68e72235088aec2529d (diff) |
dt: add helper for phandle allocation
Phandle references work by having 2 pieces:
- a "phandle" 1-cell property in the device tree node
- a reference to the same value in a property we want to point
to the other node
To generate the 1-cell property, we need an allocation mechanism that
gives us a unique number space. This patch adds an allocator for these
properties.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'device_tree.h')
-rw-r--r-- | device_tree.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/device_tree.h b/device_tree.h index 5f76f40eeb..97af3454f7 100644 --- a/device_tree.h +++ b/device_tree.h @@ -27,6 +27,7 @@ int qemu_devtree_setprop_phandle(void *fdt, const char *node_path, const char *property, const char *target_node_path); uint32_t qemu_devtree_get_phandle(void *fdt, const char *path); +uint32_t qemu_devtree_alloc_phandle(void *fdt); int qemu_devtree_nop_node(void *fdt, const char *node_path); int qemu_devtree_add_subnode(void *fdt, const char *name); |