Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Masahiro Yamada | 9607f7a | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 2 | |
| 3 | #include <common.h> |
Masahiro Yamada | 75f82d0 | 2018-03-05 01:20:11 +0900 | [diff] [blame] | 4 | #include <linux/libfdt.h> |
Masahiro Yamada | 9607f7a | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 5 | #include <linux/compiler.h> |
| 6 | |
| 7 | int __weak checkboard(void) |
| 8 | { |
Masahiro Yamada | 9607f7a | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 9 | return 0; |
| 10 | } |
| 11 | |
| 12 | /* |
| 13 | * If the root node of the DTB has a "model" property, show it. |
Haikun.Wang@freescale.com | 7f7335e | 2015-07-09 19:58:03 +0800 | [diff] [blame] | 14 | * Then call checkboard(). |
Masahiro Yamada | 9607f7a | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 15 | */ |
Marcel Ziswiler | 6e8bc1a | 2016-11-16 17:49:20 +0100 | [diff] [blame] | 16 | int __weak show_board_info(void) |
Masahiro Yamada | 9607f7a | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 17 | { |
Marcel Ziswiler | 7c701b3 | 2016-11-16 17:49:19 +0100 | [diff] [blame] | 18 | #ifdef CONFIG_OF_CONTROL |
Masahiro Yamada | 9607f7a | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 19 | DECLARE_GLOBAL_DATA_PTR; |
| 20 | const char *model; |
| 21 | |
| 22 | model = fdt_getprop(gd->fdt_blob, 0, "model", NULL); |
| 23 | |
Haikun.Wang@freescale.com | 7f7335e | 2015-07-09 19:58:03 +0800 | [diff] [blame] | 24 | if (model) |
Masahiro Yamada | 9607f7a | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 25 | printf("Model: %s\n", model); |
Masahiro Yamada | 9607f7a | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 26 | #endif |
| 27 | |
| 28 | return checkboard(); |
| 29 | } |