56442bb101
Currently we have of_get_fixed_tree() which assumes that there is a global variable holding a oftree. This seems not very flexible, so for now introduce a of_fix_tree() which takes an fdt_header as argument and walks the list of registered of fixup functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
23 lines
761 B
C
23 lines
761 B
C
#ifndef __OF_H
|
|
#define __OF_H
|
|
|
|
#include <fdt.h>
|
|
|
|
extern struct fdt_header *barebox_fdt;
|
|
|
|
int fdt_print(struct fdt_header *working_fdt, const char *pathp);
|
|
|
|
struct fdt_header *of_get_fixed_tree(void);
|
|
int of_fix_tree(struct fdt_header *fdt);
|
|
int of_register_fixup(int (*fixup)(struct fdt_header *));
|
|
|
|
int fdt_find_and_setprop(struct fdt_header *fdt, const char *node, const char *prop,
|
|
const void *val, int len, int create);
|
|
void do_fixup_by_path(struct fdt_header *fdt, const char *path, const char *prop,
|
|
const void *val, int len, int create);
|
|
void do_fixup_by_path_u32(struct fdt_header *fdt, const char *path, const char *prop,
|
|
u32 val, int create);
|
|
int fdt_get_path_or_create(struct fdt_header *fdt, const char *path);
|
|
|
|
#endif /* __OF_H */
|