blob: 6afe98edeee936ebf4313cfdcad1e11def5a8934 [file] [log] [blame]
Masahiro Yamada0365ffc2015-01-14 17:07:05 +09001/*
2 * SPDX-License-Identifier: GPL-2.0+
3 */
4
5#include <common.h>
6#include <libfdt.h>
7#include <linux/compiler.h>
8
9int __weak checkboard(void)
10{
Masahiro Yamada0365ffc2015-01-14 17:07:05 +090011 return 0;
12}
13
14/*
15 * If the root node of the DTB has a "model" property, show it.
Haikun.Wang@freescale.comdac326b2015-07-09 19:58:03 +080016 * Then call checkboard().
Masahiro Yamada0365ffc2015-01-14 17:07:05 +090017 */
18int show_board_info(void)
19{
Marcel Ziswiler62e7a5c2016-11-16 17:49:19 +010020#ifdef CONFIG_OF_CONTROL
Masahiro Yamada0365ffc2015-01-14 17:07:05 +090021 DECLARE_GLOBAL_DATA_PTR;
22 const char *model;
23
24 model = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
25
Haikun.Wang@freescale.comdac326b2015-07-09 19:58:03 +080026 if (model)
Masahiro Yamada0365ffc2015-01-14 17:07:05 +090027 printf("Model: %s\n", model);
Masahiro Yamada0365ffc2015-01-14 17:07:05 +090028#endif
29
30 return checkboard();
31}