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 = uclass_first_device_err(UCLASS_SYSINFO, &dev);
36 ret = sysinfo_get_str(dev,
37 SYSINFO_ID_BOARD_MODEL,
41 /* Fail back to the main 'model' if available */
43 model = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
48 printf("Model: %s\n", model);