Blame view
common/board_info.c
493 Bytes
83d290c56 SPDX: Convert all... |
1 |
// SPDX-License-Identifier: GPL-2.0+ |
0365ffcc0 generic-board: sh... |
2 3 |
#include <common.h> |
b08c8c487 libfdt: move head... |
4 |
#include <linux/libfdt.h> |
0365ffcc0 generic-board: sh... |
5 6 7 8 |
#include <linux/compiler.h> int __weak checkboard(void) { |
0365ffcc0 generic-board: sh... |
9 10 11 12 13 |
return 0; } /* * If the root node of the DTB has a "model" property, show it. |
dac326b82 generic_board: Ca... |
14 |
* Then call checkboard(). |
0365ffcc0 generic-board: sh... |
15 |
*/ |
f7637cc01 generic-board: ma... |
16 |
int __weak show_board_info(void) |
0365ffcc0 generic-board: sh... |
17 |
{ |
62e7a5c5f Revert "generic-b... |
18 |
#ifdef CONFIG_OF_CONTROL |
0365ffcc0 generic-board: sh... |
19 20 21 22 |
DECLARE_GLOBAL_DATA_PTR; const char *model; model = fdt_getprop(gd->fdt_blob, 0, "model", NULL); |
dac326b82 generic_board: Ca... |
23 |
if (model) |
0365ffcc0 generic-board: sh... |
24 25 |
printf("Model: %s ", model); |
0365ffcc0 generic-board: sh... |
26 27 28 29 |
#endif return checkboard(); } |