summaryrefslogtreecommitdiff
path: root/include/linux/of_fdt.h
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2014-08-14 16:48:25 +0900
committerBeomho Seo <beomho.seo@samsung.com>2014-08-14 17:41:16 +0900
commite6616cbf56d2dcb1d329861272fd7d54a3ae413f (patch)
tree8d223052ff28f3bcc97573acca3804b014a1d471 /include/linux/of_fdt.h
parent594ca3b1e20fbb7e40b79a0f88baa263e0bf8281 (diff)
downloadlinux-3.10-e6616cbf56d2dcb1d329861272fd7d54a3ae413f.tar.gz
linux-3.10-e6616cbf56d2dcb1d329861272fd7d54a3ae413f.tar.bz2
linux-3.10-e6616cbf56d2dcb1d329861272fd7d54a3ae413f.zip
of: introduce common FDT machine related functions
Introduce common of_flat_dt_match_machine and of_flat_dt_get_machine_name functions to unify architectures' handling of machine level model and compatible properties. Several architectures match the root compatible string with an arch specific list of machine descriptors duplicating the same search algorithm. Create a common implementation with a simple architecture specific hook to iterate over each machine's match table. Change-Id: I77acb5c560e2b08591c37b57d5d87023aa3fbe91 Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'include/linux/of_fdt.h')
-rw-r--r--include/linux/of_fdt.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 19f26f8d220..1573cac9704 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -117,10 +117,15 @@ extern void early_init_dt_setup_initrd_arch(unsigned long start,
extern int early_init_dt_scan_root(unsigned long node, const char *uname,
int depth, void *data);
+extern char *of_flat_dt_get_machine_name(void);
+extern void *of_flat_dt_match_machine(void *default_match,
+ void * (*get_next_compat)(const char * const**));
+
/* Other Prototypes */
extern void unflatten_device_tree(void);
extern void early_init_devtree(void *);
#else /* CONFIG_OF_FLATTREE */
+static inline const char *of_flat_dt_get_machine_name(void) { return NULL; }
static inline void unflatten_device_tree(void) {}
#endif /* CONFIG_OF_FLATTREE */