diff options
-rw-r--r-- | common/fdt_support.c | 13 | ||||
-rw-r--r-- | include/fdt_support.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c index b7d4fe5..b6f252a 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -976,3 +976,16 @@ void fdt_fixup_mtdparts(void *blob, void *node_info, int node_info_size) } } #endif + +void fdt_del_node_and_alias(void *blob, const char *alias) +{ + int off = fdt_path_offset(blob, alias); + + if (off < 0) + return; + + fdt_del_node(blob, off); + + off = fdt_path_offset(blob, "/aliases"); + fdt_delprop(blob, off, alias); +} diff --git a/include/fdt_support.h b/include/fdt_support.h index a3d5f8c..9a453af 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -82,6 +82,7 @@ int fdt_resize(void *blob); int fdt_fixup_nor_flash_size(void *blob, int cs, u32 size); void fdt_fixup_mtdparts(void *fdt, void *node_info, int node_info_size); +void fdt_del_node_and_alias(void *blob, const char *alias); #endif /* ifdef CONFIG_OF_LIBFDT */ #endif /* ifndef __FDT_SUPPORT_H */ |