Masahiro Yamada | 0365ffc | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 1 | /* |
| 2 | * SPDX-License-Identifier: GPL-2.0+ |
| 3 | */ |
| 4 | |
| 5 | #include <common.h> |
| 6 | #include <libfdt.h> |
| 7 | #include <linux/compiler.h> |
| 8 | |
| 9 | int __weak checkboard(void) |
| 10 | { |
Masahiro Yamada | 0365ffc | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 11 | return 0; |
| 12 | } |
| 13 | |
| 14 | /* |
| 15 | * If the root node of the DTB has a "model" property, show it. |
Haikun.Wang@freescale.com | dac326b | 2015-07-09 19:58:03 +0800 | [diff] [blame] | 16 | * Then call checkboard(). |
Masahiro Yamada | 0365ffc | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 17 | */ |
| 18 | int show_board_info(void) |
| 19 | { |
Marcel Ziswiler | a9ad18c | 2015-08-05 17:17:00 +0200 | [diff] [blame] | 20 | #if defined(CONFIG_OF_CONTROL) && !defined(CONFIG_CUSTOM_BOARDINFO) |
Masahiro Yamada | 0365ffc | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 21 | DECLARE_GLOBAL_DATA_PTR; |
| 22 | const char *model; |
| 23 | |
| 24 | model = fdt_getprop(gd->fdt_blob, 0, "model", NULL); |
| 25 | |
Haikun.Wang@freescale.com | dac326b | 2015-07-09 19:58:03 +0800 | [diff] [blame] | 26 | if (model) |
Masahiro Yamada | 0365ffc | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 27 | printf("Model: %s\n", model); |
Masahiro Yamada | 0365ffc | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 28 | #endif |
| 29 | |
| 30 | return checkboard(); |
| 31 | } |