diff options
author | Mike Ditto <mditto@consentry.com> | 2008-10-21 11:32:29 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-10-22 15:01:21 +1100 |
commit | 71773f0337bee8a3701aaaec22581c18a5f44679 (patch) | |
tree | 06ff80057f216d0515b027b963af8a926dca8955 /arch/powerpc/boot/libfdt-wrapper.c | |
parent | 201bdc868d9e3122bbe4491aa6b5fc4dee4cdb96 (diff) | |
download | blackbird-op-linux-71773f0337bee8a3701aaaec22581c18a5f44679.tar.gz blackbird-op-linux-71773f0337bee8a3701aaaec22581c18a5f44679.zip |
powerpc: Add del_node() for early boot code to prune inapplicable devices.
Some platforms have variants that can share most of a flat device tree but need
a few devices selectively pruned at boot time. This adds del_node() to ops.h
to allow access to the existing fdt_del_node().
Signed-off-by: Mike Ditto <mditto@consentry.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/boot/libfdt-wrapper.c')
-rw-r--r-- | arch/powerpc/boot/libfdt-wrapper.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/boot/libfdt-wrapper.c b/arch/powerpc/boot/libfdt-wrapper.c index 1daa73f08ba8..9276327bc2bb 100644 --- a/arch/powerpc/boot/libfdt-wrapper.c +++ b/arch/powerpc/boot/libfdt-wrapper.c @@ -105,6 +105,11 @@ static int fdt_wrapper_setprop(const void *devp, const char *name, return check_err(rc); } +static int fdt_wrapper_del_node(const void *devp) +{ + return fdt_del_node(fdt, devp_offset(devp)); +} + static void *fdt_wrapper_get_parent(const void *devp) { return offset_devp(fdt_parent_offset(fdt, devp_offset(devp))); @@ -174,6 +179,7 @@ void fdt_init(void *blob) dt_ops.create_node = fdt_wrapper_create_node; dt_ops.find_node_by_prop_value = fdt_wrapper_find_node_by_prop_value; dt_ops.find_node_by_compatible = fdt_wrapper_find_node_by_compatible; + dt_ops.del_node = fdt_wrapper_del_node; dt_ops.get_path = fdt_wrapper_get_path; dt_ops.finalize = fdt_wrapper_finalize; |