1 // SPDX-License-Identifier: GPL-2.0+
7 #include <asm/global_data.h>
8 #include <linux/libfdt.h>
9 #include <linux/compiler.h>
11 DECLARE_GLOBAL_DATA_PTR;
13 int __weak checkboard(void)
19 * Check sysinfo for board information. Failing that if the root node of the DTB
20 * has a "model" property, show it.
22 * Then call checkboard().
24 int __weak show_board_info(void)
26 if (IS_ENABLED(CONFIG_OF_CONTROL)) {
32 if (IS_ENABLED(CONFIG_SYSINFO)) {
33 /* This might provide more detail */
34 ret = sysinfo_get(&dev);
36 ret = sysinfo_detect(dev);
38 ret = sysinfo_get_str(dev,
39 SYSINFO_ID_BOARD_MODEL,
45 /* Fail back to the main 'model' if available */
47 model = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
52 printf("Model: %s\n", model);