12 #include <linux/export.h>
13 #include <linux/errno.h>
14 #include <linux/types.h>
22 #include <asm/setup.h>
75 unsigned int score, mdesc_score = ~1;
76 unsigned long dt_root;
90 dt_root = of_get_flat_dt_root();
92 score = of_flat_dt_match(dt_root, mdesc->
dt_compat);
93 if (score > 0 && score < mdesc_score) {
103 "device tree compatible list:\n[ ");
105 prop = of_get_flat_dt_prop(dt_root,
"compatible", &size);
116 model = of_get_flat_dt_prop(dt_root,
"model",
NULL);
118 model = of_get_flat_dt_prop(dt_root,
"compatible",
NULL);
121 pr_info(
"Machine: %s, model: %s\n", mdesc_best->
name, model);
126 of_scan_flat_dt(early_init_dt_scan_root,
NULL);
128 of_scan_flat_dt(early_init_dt_scan_memory,
NULL);