diff options
author | Rob Herring <rob.herring@calxeda.com> | 2014-08-14 16:48:25 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 12:00:36 +0900 |
commit | 5db58c8f6f1364dc632e44c9e578c46b041d18e3 (patch) | |
tree | b867f1ba1fcbdc2c11c7703b3e22d2a69852e5a7 /include/linux | |
parent | c428087fefae2a33ee53d1f3fbf9d6c64d16bfbe (diff) | |
download | linux-3.10-5db58c8f6f1364dc632e44c9e578c46b041d18e3.tar.gz linux-3.10-5db58c8f6f1364dc632e44c9e578c46b041d18e3.tar.bz2 linux-3.10-5db58c8f6f1364dc632e44c9e578c46b041d18e3.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')
-rw-r--r-- | include/linux/of_fdt.h | 5 |
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 */ |