board:samsung: move checkboard to common file
authorPiotr Wilczek <p.wilczek@samsung.com>
Fri, 7 Mar 2014 13:59:42 +0000 (14:59 +0100)
committerMinkyu Kang <mk7.kang@samsung.com>
Wed, 12 Mar 2014 10:54:59 +0000 (19:54 +0900)
The checkboard function's implementation is common for all
DT supporting boards and should be placed in the board common file.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Chander Kashyap <k.chander@samsung.com>
Cc: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
Cc: Amar <amarendra.xt@samsung.com>
Acked-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
board/samsung/common/board.c
board/samsung/smdk5250/exynos5-dt.c
board/samsung/smdk5420/smdk5420.c

index cd873bc56d63b308971554af76b45d8d7f2736e2..f8562b215f6ae57dbbe92abc7fabe0368d70067f 100644 (file)
@@ -377,7 +377,19 @@ int board_mmc_init(bd_t *bis)
        return ret;
 }
 #endif
+
+#ifdef CONFIG_DISPLAY_BOARDINFO
+int checkboard(void)
+{
+       const char *board_name;
+
+       board_name = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
+       printf("Board: %s\n", board_name ? board_name : "unknown");
+
+       return 0;
+}
 #endif
+#endif /* CONFIG_OF_CONTROL */
 
 #ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
index 5fb86649360ecf82d9e50561fa87410cf1735096..b22fba502d4adfdaf1a2273bb8db849f53ffddb5 100644 (file)
@@ -45,21 +45,6 @@ int exynos_init(void)
        return 0;
 }
 
-#ifdef CONFIG_DISPLAY_BOARDINFO
-int checkboard(void)
-{
-       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);
-
-       return 0;
-}
-#endif
-
 #ifdef CONFIG_LCD
 void exynos_cfg_lcd_gpio(void)
 {
index 3ad2ad0e565084e6be6cfb408831f4a08d6cebee..e4606ecd2aa2a1bc787d9b67327904d3b3ecbdca 100644 (file)
@@ -142,18 +142,3 @@ int board_get_revision(void)
 {
        return 0;
 }
-
-#ifdef CONFIG_DISPLAY_BOARDINFO
-int checkboard(void)
-{
-       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);
-
-       return 0;
-}
-#endif