aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-10-30 11:49:09 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-01-01 15:03:25 -0500
commita4f740cf33f7f6c164bbde3c0cdbcc77b0c4997c (patch)
tree62d061939000c65d91cf760a51509d388270f4c9 /include
parent73930a85cf38d72851305fcf640c07b4c13aa405 (diff)
of/flattree: Add of_flat_dt_match() helper function
This patch adds of_flat_dt_match() which tests a node for compatibility with a list of values and converts the relevant powerpc platform code to use it. This approach simplifies the board support code a bit. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/of_fdt.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 9ce5dfd2186a..ee96091f7d25 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -68,6 +68,8 @@ extern void *of_fdt_get_property(struct boot_param_header *blob,
68extern int of_fdt_is_compatible(struct boot_param_header *blob, 68extern int of_fdt_is_compatible(struct boot_param_header *blob,
69 unsigned long node, 69 unsigned long node,
70 const char *compat); 70 const char *compat);
71extern int of_fdt_match(struct boot_param_header *blob, unsigned long node,
72 const char **compat);
71extern void of_fdt_unflatten_tree(unsigned long *blob, 73extern void of_fdt_unflatten_tree(unsigned long *blob,
72 struct device_node **mynodes); 74 struct device_node **mynodes);
73 75
@@ -84,6 +86,7 @@ extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname,
84extern void *of_get_flat_dt_prop(unsigned long node, const char *name, 86extern void *of_get_flat_dt_prop(unsigned long node, const char *name,
85 unsigned long *size); 87 unsigned long *size);
86extern int of_flat_dt_is_compatible(unsigned long node, const char *name); 88extern int of_flat_dt_is_compatible(unsigned long node, const char *name);
89extern int of_flat_dt_match(unsigned long node, const char **matches);
87extern unsigned long of_get_flat_dt_root(void); 90extern unsigned long of_get_flat_dt_root(void);
88 91
89extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, 92extern int early_init_dt_scan_chosen(unsigned long node, const char *uname,