diff options
author | Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> | 2010-11-18 18:54:59 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-12-29 18:53:45 -0500 |
commit | 9706a36e35c4ce04f28a62cfe1205b4e3b0dd13c (patch) | |
tree | 12f378664e5fa9fe560b281fa56214772df3f6ab /include/linux/of_fdt.h | |
parent | e6ce1324e4f08b0d984340201a125806dae0e9a6 (diff) |
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>
Diffstat (limited to 'include/linux/of_fdt.h')
-rw-r--r-- | include/linux/of_fdt.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index 7bbf5b328438..70c5b736f0a3 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h | |||
@@ -58,6 +58,17 @@ struct boot_param_header { | |||
58 | }; | 58 | }; |
59 | 59 | ||
60 | #if defined(CONFIG_OF_FLATTREE) | 60 | #if defined(CONFIG_OF_FLATTREE) |
61 | |||
62 | /* For scanning an arbitrary device-tree at any time */ | ||
63 | extern char *of_fdt_get_string(struct boot_param_header *blob, u32 offset); | ||
64 | extern void *of_fdt_get_property(struct boot_param_header *blob, | ||
65 | unsigned long node, | ||
66 | const char *name, | ||
67 | unsigned long *size); | ||
68 | extern int of_fdt_is_compatible(struct boot_param_header *blob, | ||
69 | unsigned long node, | ||
70 | const char *compat); | ||
71 | |||
61 | /* TBD: Temporary export of fdt globals - remove when code fully merged */ | 72 | /* TBD: Temporary export of fdt globals - remove when code fully merged */ |
62 | extern int __initdata dt_root_addr_cells; | 73 | extern int __initdata dt_root_addr_cells; |
63 | extern int __initdata dt_root_size_cells; | 74 | extern int __initdata dt_root_size_cells; |