[U-Boot] [PATCH 07/10] samsung: board: checkboard: call get_board_type() for CONFIG_BOARD_TYPES

Przemyslaw Marczak p.marczak at samsung.com
Tue Jun 10 13:33:01 CEST 2014


For support of multiple board types in a one config - it is welcome
to display the current board model. This is what get_board_type()
should return.

Signed-off-by: Przemyslaw Marczak <p.marczak at samsung.com>
Cc: Piotr Wilczek <p.wilczek at samsung.com>
Cc: Minkyu Kang <mk7.kang at samsung.com>
---
 board/samsung/common/board.c | 5 ++++-
 include/samsung/misc.h       | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 9a745d9..c1f3742 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -283,7 +283,10 @@ int checkboard(void)
 
 	board_name = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
 	printf("Board: %s\n", board_name ? board_name : "unknown");
-
+#ifdef CONFIG_BOARD_TYPES
+	const char *board_type = get_board_type();
+	printf("Model: %s\n", board_type ? board_type : "unknown");
+#endif
 	return 0;
 }
 #endif
diff --git a/include/samsung/misc.h b/include/samsung/misc.h
index bad591f..cbd5456 100644
--- a/include/samsung/misc.h
+++ b/include/samsung/misc.h
@@ -37,6 +37,7 @@ void draw_logo(void);
 void set_dfu_boot_alt(int bootmode);
 #endif
 #ifdef CONFIG_BOARD_TYPES
+const char *get_board_type(void);
 const char *get_board_type_fdt(void);
 #endif
 
-- 
1.9.1



More information about the U-Boot mailing list