aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of_fdt.h
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 13:03:25 -0700
commita4f740cf33f7f6c164bbde3c0cdbcc77b0c4997c (patch)
tree62d061939000c65d91cf760a51509d388270f4c9 /include/linux/of_fdt.h
parentof_serial: explicitly include of_irq.h (diff)
downloadlinux-dev-a4f740cf33f7f6c164bbde3c0cdbcc77b0c4997c.tar.xz
linux-dev-a4f740cf33f7f6c164bbde3c0cdbcc77b0c4997c.zip
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/linux/of_fdt.h')
-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,
extern int of_fdt_is_compatible(struct boot_param_header *blob,
unsigned long node,
const char *compat);
+extern int of_fdt_match(struct boot_param_header *blob, unsigned long node,
+ const char **compat);
extern void of_fdt_unflatten_tree(unsigned long *blob,
struct device_node **mynodes);
@@ -84,6 +86,7 @@ extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname,
extern void *of_get_flat_dt_prop(unsigned long node, const char *name,
unsigned long *size);
extern int of_flat_dt_is_compatible(unsigned long node, const char *name);
+extern int of_flat_dt_match(unsigned long node, const char **matches);
extern unsigned long of_get_flat_dt_root(void);
extern int early_init_dt_scan_chosen(unsigned long node, const char *uname,