of/flattree: Add non-boottime device tree functions
In preparation for providing run-time handling of device trees, factor out some of the basic functions so that they take an arbitrary blob, rather than relying on the single boot-time tree. V2: - functions have of_fdt_* names - removed find_flat_dt_string - blob argument is first Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:

committed by
Grant Likely

parent
e6ce1324e4
commit
9706a36e35
@@ -58,6 +58,17 @@ struct boot_param_header {
|
||||
};
|
||||
|
||||
#if defined(CONFIG_OF_FLATTREE)
|
||||
|
||||
/* For scanning an arbitrary device-tree at any time */
|
||||
extern char *of_fdt_get_string(struct boot_param_header *blob, u32 offset);
|
||||
extern void *of_fdt_get_property(struct boot_param_header *blob,
|
||||
unsigned long node,
|
||||
const char *name,
|
||||
unsigned long *size);
|
||||
extern int of_fdt_is_compatible(struct boot_param_header *blob,
|
||||
unsigned long node,
|
||||
const char *compat);
|
||||
|
||||
/* TBD: Temporary export of fdt globals - remove when code fully merged */
|
||||
extern int __initdata dt_root_addr_cells;
|
||||
extern int __initdata dt_root_size_cells;
|
||||
|
Reference in New Issue
Block a user