Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Masahiro Yamada | 0365ffc | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 2 | |
| 3 | #include <common.h> |
Simon Glass | 691d719 | 2020-05-10 11:40:02 -0600 | [diff] [blame] | 4 | #include <init.h> |
Masahiro Yamada | b08c8c4 | 2018-03-05 01:20:11 +0900 | [diff] [blame] | 5 | #include <linux/libfdt.h> |
Masahiro Yamada | 0365ffc | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 6 | #include <linux/compiler.h> |
| 7 | |
| 8 | int __weak checkboard(void) |
| 9 | { |
Masahiro Yamada | 0365ffc | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 10 | return 0; |
| 11 | } |
| 12 | |
| 13 | /* |
| 14 | * 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] | 15 | * Then call checkboard(). |
Masahiro Yamada | 0365ffc | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 16 | */ |
Marcel Ziswiler | f7637cc | 2016-11-16 17:49:20 +0100 | [diff] [blame] | 17 | int __weak show_board_info(void) |
Masahiro Yamada | 0365ffc | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 18 | { |
Marcel Ziswiler | 62e7a5c | 2016-11-16 17:49:19 +0100 | [diff] [blame] | 19 | #ifdef CONFIG_OF_CONTROL |
Masahiro Yamada | 0365ffc | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 20 | DECLARE_GLOBAL_DATA_PTR; |
| 21 | const char *model; |
| 22 | |
| 23 | model = fdt_getprop(gd->fdt_blob, 0, "model", NULL); |
| 24 | |
Haikun.Wang@freescale.com | dac326b | 2015-07-09 19:58:03 +0800 | [diff] [blame] | 25 | if (model) |
Masahiro Yamada | 0365ffc | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 26 | printf("Model: %s\n", model); |
Masahiro Yamada | 0365ffc | 2015-01-14 17:07:05 +0900 | [diff] [blame] | 27 | #endif |
| 28 | |
| 29 | return checkboard(); |
| 30 | } |