| // SPDX-License-Identifier: GPL-2.0+ |
| #include <asm/global_data.h> |
| #include <linux/libfdt.h> |
| #include <linux/compiler.h> |
| int __weak checkboard(void) |
| * Check sysinfo for board information. Failing that if the root node of the DTB |
| * has a "model" property, show it. |
| * Then call checkboard(). |
| int __weak show_board_info(void) |
| if (IS_ENABLED(CONFIG_OF_CONTROL)) { |
| if (IS_ENABLED(CONFIG_SYSINFO)) { |
| /* This might provide more detail */ |
| ret = sysinfo_detect(dev); |
| ret = sysinfo_get_str(dev, |
| /* Fail back to the main 'model' if available */ |
| model = fdt_getprop(gd->fdt_blob, 0, "model", NULL); |
| printf("Model: %s\n", model); |