From bb682001f16504c2885a4ce5f82bff79df7a83c9 Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Tue, 3 May 2011 13:24:07 -0500 Subject: fdt: introduce fdt_verify_alias_address() and fdt_get_base_address() Introduce two functions, fdt_verify_alias_address() and fdt_get_base_address(), which can be used to verify the physical address of a device in a device tree. fdt_get_base_address() returns the base address of an SOC or PCI node. fdt_verify_alias_address() prints a message if the address of a node specified by an alias does not match the given physical address. Signed-off-by: Timur Tabi --- include/fdt_support.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/fdt_support.h b/include/fdt_support.h index ce6817b..cefc990 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -90,5 +90,9 @@ int fdt_node_offset_by_compat_reg(void *blob, const char *compat, int fdt_alloc_phandle(void *blob); int fdt_add_edid(void *blob, const char *compat, unsigned char *buf); +int fdt_verify_alias_address(void *fdt, int anode, const char *alias, + u64 addr); +u64 fdt_get_base_address(void *fdt, int node); + #endif /* ifdef CONFIG_OF_LIBFDT */ #endif /* ifndef __FDT_SUPPORT_H */ -- cgit v1.1