aboutsummaryrefslogtreecommitdiff
path: root/dtc.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-11-01 16:49:26 +1100
committerJon Loeliger <jdl@freescale.com>2007-11-01 08:03:37 -0500
commit2f1ccc36f478d0cdb55666eb62ae6a338751be9c (patch)
treea3b2c0a3b55f468d0eca4c801d736ad1fcb06f74 /dtc.h
parenta041dcdc48453f26b76bccdb5e2a1ebb3a0ea987 (diff)
downloaddtc-2f1ccc36f478d0cdb55666eb62ae6a338751be9c.tar.gz
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>
Diffstat (limited to 'dtc.h')
-rw-r--r--dtc.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/dtc.h b/dtc.h
index 1fc6523..d080153 100644
--- a/dtc.h
+++ b/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,