aboutsummaryrefslogtreecommitdiff
path: root/device_tree.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2011-07-21 01:52:57 +0200
committerAlexander Graf <agraf@suse.de>2011-10-06 09:43:34 +0200
commitd69a8e6387adcd79c29666930bc64fffd2a3f456 (patch)
tree3d03f8ce32e437d7e455755ad3548bab38a85426 /device_tree.c
parenta915249fa1e0a59e9a893cd335fd31af39b01bde (diff)
device tree: add nop_node
We have a qemu internal abstraction layer on FDT. While I'm not fully convinced we need it at all, it's missing the nop_node functionality that we now need on e500. So let's add it and think about the general future of that API later. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'device_tree.c')
-rw-r--r--device_tree.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/device_tree.c b/device_tree.c
index 3a224d1e0f..23e89e3b90 100644
--- a/device_tree.c
+++ b/device_tree.c
@@ -107,3 +107,14 @@ int qemu_devtree_setprop_string(void *fdt, const char *node_path,
return fdt_setprop_string(fdt, offset, property, string);
}
+
+int qemu_devtree_nop_node(void *fdt, const char *node_path)
+{
+ int offset;
+
+ offset = fdt_path_offset(fdt, node_path);
+ if (offset < 0)
+ return offset;
+
+ return fdt_nop_node(fdt, offset);
+}