[U-Boot] [PATCH V5 05/12] board:samsung: move checkboard to common file

Piotr Wilczek p.wilczek at samsung.com
Fri Mar 7 14:59:42 CET 2014


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 at samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
Cc: Chander Kashyap <k.chander at samsung.com>
Cc: Rajeshwari S Shinde <rajeshwari.s at samsung.com>
Cc: Amar <amarendra.xt at samsung.com>

Acked-by: Rajeshwari Shinde <rajeshwari.s at samsung.com>
---
Changes for v5:
 - none

Changes for v4:
 - none

Changes for v3:
 - none

Changes for v2:
 - new patch

 board/samsung/common/board.c        | 12 ++++++++++++
 board/samsung/smdk5250/exynos5-dt.c | 15 ---------------
 board/samsung/smdk5420/smdk5420.c   | 15 ---------------
 3 files changed, 12 insertions(+), 30 deletions(-)

diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index cd873bc..f8562b2 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -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)
diff --git a/board/samsung/smdk5250/exynos5-dt.c b/board/samsung/smdk5250/exynos5-dt.c
index 5fb8664..b22fba5 100644
--- a/board/samsung/smdk5250/exynos5-dt.c
+++ b/board/samsung/smdk5250/exynos5-dt.c
@@ -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)
 {
diff --git a/board/samsung/smdk5420/smdk5420.c b/board/samsung/smdk5420/smdk5420.c
index 3ad2ad0..e4606ec 100644
--- a/board/samsung/smdk5420/smdk5420.c
+++ b/board/samsung/smdk5420/smdk5420.c
@@ -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
-- 
1.8.3.2



More information about the U-Boot mailing list