xref: /rk3399_rockchip-uboot/common/board_info.c (revision 8c7c24c01a6f59f93e6564743e0e75c973d73387)
1 /*
2  * SPDX-License-Identifier:	GPL-2.0+
3  */
4 
5 #include <common.h>
6 #include <linux/libfdt.h>
7 #include <linux/compiler.h>
8 
9 int __weak checkboard(void)
10 {
11 	return 0;
12 }
13 
14 /*
15  * If the root node of the DTB has a "model" property, show it.
16  * Then call checkboard().
17  */
18 int __weak show_board_info(void)
19 {
20 #ifdef CONFIG_OF_CONTROL
21 	DECLARE_GLOBAL_DATA_PTR;
22 	const char *model;
23 
24 	model = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
25 
26 	if (model)
27 		printf("Model: %s\n", model);
28 #endif
29 	if (!gd->flags & GD_FLG_RELOC)
30 		printf("MPIDR: 0x%lx\n", (ulong)read_mpidr() & 0xfff);
31 
32 #ifdef CONFIG_ARM64_BOOT_AARCH32
33 	if (!(gd->flags & GD_FLG_RELOC))
34 		printf("CPU: AArch32\n");
35 #endif
36 
37 	return checkboard();
38 }
39