drivers: of: add function to scan fdt nodes given by path

Add a function to scan the flattened device-tree starting from the
node given by the path. It is used to extract information (like reserved
memory), which is required on early boot before we can unflatten the tree.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Tomasz Figa <t.figa@samsung.com>
Reviewed-by: Rob Herring <rob.herring@calxeda.com>
This commit is contained in:
Marek Szyprowski
2013-08-26 14:41:56 +02:00
parent a254738039
commit 57d74bcf30
2 changed files with 79 additions and 0 deletions

View File

@@ -90,6 +90,9 @@ extern void *of_get_flat_dt_prop(unsigned long node, const char *name,
extern int of_flat_dt_is_compatible(unsigned long node, const char *name);
extern int of_flat_dt_match(unsigned long node, const char *const *matches);
extern unsigned long of_get_flat_dt_root(void);
extern int of_scan_flat_dt_by_path(const char *path,
int (*it)(unsigned long node, const char *name, int depth, void *data),
void *data);
extern int early_init_dt_scan_chosen(unsigned long node, const char *uname,
int depth, void *data);