summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2010-07-04 12:48:21 -0500
committerKumar Gala <galak@kernel.crashing.org>2010-07-20 04:40:06 -0500
commit75e73afd5784c0df6a5e35c5a5b2e2fce0296bc0 (patch)
tree06cbabb33e76153a7bbab9c15daa6f126e2c8968 /include
parenta0342c0804251c84a7ec1a2c78ea3bb30b5b5058 (diff)
downloadu-boot-imx-75e73afd5784c0df6a5e35c5a5b2e2fce0296bc0.zip
u-boot-imx-75e73afd5784c0df6a5e35c5a5b2e2fce0296bc0.tar.gz
u-boot-imx-75e73afd5784c0df6a5e35c5a5b2e2fce0296bc0.tar.bz2
fdt: Add fdt_node_offset_by_compat_reg helper
Given a compatible string and physical address try and find a node that matches. This is useful when we want to find a specific device node to update (for example if we have multiple PCI nodes we can use the physical address to distinguish them when trying to update the device tree). Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
Diffstat (limited to 'include')
-rw-r--r--include/fdt_support.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/fdt_support.h b/include/fdt_support.h
index 78c38b2..54af9fe 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -84,6 +84,8 @@ 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);
u64 fdt_translate_address(void *blob, int node_offset, const u32 *in_addr);
+int fdt_node_offset_by_compat_reg(void *blob, const char *compat,
+ phys_addr_t compat_off);
#endif /* ifdef CONFIG_OF_LIBFDT */
#endif /* ifndef __FDT_SUPPORT_H */