From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaehoon Chung Date: Fri, 04 Jul 2014 14:49:36 +0900 Subject: [U-Boot] [PATCH v4 08/12] samsung: board: enable support of multiple board types In-Reply-To: <1404301814-3657-9-git-send-email-p.marczak@samsung.com> References: <1403792137-3113-1-git-send-email-p.marczak@samsung.com> <1404301814-3657-1-git-send-email-p.marczak@samsung.com> <1404301814-3657-9-git-send-email-p.marczak@samsung.com> Message-ID: <53B64070.4060309@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 07/02/2014 08:50 PM, Przemyslaw Marczak wrote: > This change adds declaration of functions: > - set_board_type() - called at checkboard() > - get_board_type() - called at checkboard() > - get_board_name() > > For supporting 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 > Cc: Piotr Wilczek > Cc: Minkyu Kang > > --- > Changes v3: > - change the commit order > - include/samsung/misc.h: add new functions declaration > - update a commit message > > Changes v4: > - checkboard(): remove redundant variable > --- > board/samsung/common/board.c | 12 +++++++++--- > include/samsung/misc.h | 5 +++++ > 2 files changed, 14 insertions(+), 3 deletions(-) > > diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c > index a46e87b..3e27130 100644 > --- a/board/samsung/common/board.c > +++ b/board/samsung/common/board.c > @@ -280,11 +280,17 @@ int board_mmc_init(bd_t *bis) > #ifdef CONFIG_DISPLAY_BOARDINFO > int checkboard(void) > { > - const char *board_name; > + const char *board_info; Is there a reason that it's renaming? Best Regards, Jaehoon Chung > > - board_name = fdt_getprop(gd->fdt_blob, 0, "model", NULL); > - printf("Board: %s\n", board_name ? board_name : "unknown"); > + board_info = fdt_getprop(gd->fdt_blob, 0, "model", NULL); > + printf("Board: %s\n", board_info ? board_info : "unknown"); > +#ifdef CONFIG_BOARD_TYPES > + set_board_type(); > > + board_info = get_board_type(); > + > + printf("Model: %s\n", board_info ? board_info : "unknown"); > +#endif > return 0; > } > #endif > diff --git a/include/samsung/misc.h b/include/samsung/misc.h > index e82bf32..cc41997 100644 > --- a/include/samsung/misc.h > +++ b/include/samsung/misc.h > @@ -33,5 +33,10 @@ char *get_dfu_alt_system(void); > char *get_dfu_alt_boot(void); > void set_dfu_alt_info(void); > #endif > +#ifdef CONFIG_BOARD_TYPES > +void set_board_type(void); > +const char *get_board_type(void); > +const char *get_board_name(void); > +#endif > > #endif /* __SAMSUNG_MISC_COMMON_H__ */ >