summaryrefslogtreecommitdiff
path: root/dtc.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-10-18 17:22:30 +1000
committerJon Loeliger <jdl@freescale.com>2007-10-22 09:53:15 -0500
commit169f0b183d45b87ba6dfc194792aee6170ffb54d (patch)
treed82f393d9df2ec05b823fc0de743b02d107b19cb /dtc.h
parent394e47208df7e3b22c089745695f41966d100f3e (diff)
downloaddtc-169f0b183d45b87ba6dfc194792aee6170ffb54d.tar.gz
dtc: Disable semantic checks by default
At present, dtc makes a lot of semantic checks on the device tree by default, and will refuse to produce output if they fail. This means people tend to need -f to force output despite failing semantic checks rather a lot. This patch splits the device tree checks into structural checks (no bad or duplicate names or phandles) and semantic checks (everything else). By default, only the structural checks are performed, and are fatal. -f will force output even with structural errors (using this in -Idts mode would essentially always be a bad idea, but it might be useful in -Idtb mode for examining a malformed dtb). Semantic checks are only performed if the new -c command line option is supplied, and are always warnings only. Semantic checks will never be performed on a tree with structural errors. This patch is only a stopgap before implementing proper fine-grained error/warning handling, but it should at least get rid of the far-too-frequent need for -f for the time being. This patch removes the -f from the dtc testcases now that it's no longer necessary. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'dtc.h')
-rw-r--r--dtc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/dtc.h b/dtc.h
index 09dec54..77494af 100644
--- a/dtc.h
+++ b/dtc.h
@@ -188,6 +188,10 @@ 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);
+
int check_device_tree(struct node *dt, int outversion, int boot_cpuid_phys);
/* Boot info (tree plus memreserve information */