mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
dtc: Move tree checking code to checks.c
This patch moves the dtc code for checking the device tree its processing into a new checks.c. The tree accessor functions from livetree.c which the checks use are exported and added to dtc.h. Another small step towards a flexible checking architecture. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
a041dcdc48
commit
2f1ccc36f4
4 changed files with 478 additions and 449 deletions
15
dtc.h
15
dtc.h
|
@ -189,11 +189,13 @@ struct node *chain_node(struct node *first, struct node *list);
|
|||
void add_property(struct node *node, struct property *prop);
|
||||
void add_child(struct node *parent, struct node *child);
|
||||
|
||||
int check_structure(struct node *dt);
|
||||
void fixup_references(struct node *dt);
|
||||
int check_semantics(struct node *dt, int outversion, int boot_cpuid_phys);
|
||||
char *get_unitname(struct node *node);
|
||||
struct property *get_property(struct node *node, char *propname);
|
||||
cell_t propval_cell(struct property *prop);
|
||||
struct node *get_subnode(struct node *node, char *nodename);
|
||||
struct node *get_node_by_phandle(struct node *tree, cell_t phandle);
|
||||
|
||||
int check_device_tree(struct node *dt, int outversion, int boot_cpuid_phys);
|
||||
void fixup_references(struct node *dt);
|
||||
|
||||
/* Boot info (tree plus memreserve information */
|
||||
|
||||
|
@ -220,6 +222,11 @@ struct boot_info {
|
|||
struct boot_info *build_boot_info(struct reserve_info *reservelist,
|
||||
struct node *tree);
|
||||
|
||||
/* Checks */
|
||||
|
||||
int check_structure(struct node *dt);
|
||||
int check_semantics(struct node *dt, int outversion, int boot_cpuid_phys);
|
||||
|
||||
/* Flattened trees */
|
||||
|
||||
void dt_to_blob(FILE *f, struct boot_info *bi, int version,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue