SMDK5250: FDT: Retrieve board model via DT
Print out the board model by parsing the device tree file. Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
This commit is contained in:
parent
c42ffff02a
commit
07f17507c4
@ -336,8 +336,17 @@ int board_eth_init(bd_t *bis)
|
||||
#ifdef CONFIG_DISPLAY_BOARDINFO
|
||||
int checkboard(void)
|
||||
{
|
||||
printf("\nBoard: SMDK5250\n");
|
||||
#ifdef CONFIG_OF_CONTROL
|
||||
const char *board_name;
|
||||
|
||||
board_name = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
|
||||
if (board_name == NULL)
|
||||
printf("\nUnknown Board\n");
|
||||
else
|
||||
printf("\nBoard: %s\n", board_name);
|
||||
#else
|
||||
printf("\nBoard: SMDK5250\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user