]> git.sur5r.net Git - u-boot/commitdiff
SMDK5250: FDT: Retrieve board model via DT
authorRajeshwari Shinde <rajeshwari.s@samsung.com>
Mon, 18 Feb 2013 02:51:49 +0000 (02:51 +0000)
committerMinkyu Kang <mk7.kang@samsung.com>
Tue, 12 Mar 2013 01:35:10 +0000 (10:35 +0900)
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>
board/samsung/smdk5250/smdk5250.c

index 6f6f2c240f957f2f63e254c402229d7ff74b07b4..0097b3fda774fa3cd24005b0a700b80f8e0ccb06 100644 (file)
@@ -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