diff options
author | Przemyslaw Marczak <p.marczak@samsung.com> | 2014-09-01 13:50:50 +0200 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2014-09-05 13:58:50 +0900 |
commit | c9c36bf56e4c6a7df3ea5abafbd993df265c9538 (patch) | |
tree | c1b12657c48f4f2469cbe546f0c33f41af110c4f | |
parent | d50c41efcd6621481dbf4ff25331badf980cb429 (diff) | |
download | u-boot-imx-c9c36bf56e4c6a7df3ea5abafbd993df265c9538.zip u-boot-imx-c9c36bf56e4c6a7df3ea5abafbd993df265c9538.tar.gz u-boot-imx-c9c36bf56e4c6a7df3ea5abafbd993df265c9538.tar.bz2 |
samsung: misc: use board specific functions to set env board info
This change adds setup of environmental board info using
get_board_name() and get_board_type() functions for config
CONFIG_BOARD_TYPES.
This is useful in case of running many boards with just one config.
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
-rw-r--r-- | board/samsung/common/misc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c index 9e52452..8766f0c 100644 --- a/board/samsung/common/misc.c +++ b/board/samsung/common/misc.c @@ -79,8 +79,16 @@ void set_board_info(void) setenv("board_rev", info); #endif #ifdef CONFIG_OF_LIBFDT - snprintf(info, ARRAY_SIZE(info), "%s%x-%s.dtb", - CONFIG_SYS_SOC, s5p_cpu_id, CONFIG_SYS_BOARD); + const char *bdtype = ""; + const char *bdname = CONFIG_SYS_BOARD; + +#ifdef CONFIG_BOARD_TYPES + bdtype = get_board_type(); + sprintf(info, "%s%s", bdname, bdtype); + setenv("boardname", info); +#endif + snprintf(info, ARRAY_SIZE(info), "%s%x-%s%s.dtb", + CONFIG_SYS_SOC, s5p_cpu_id, bdname, bdtype); setenv("fdtfile", info); #endif } |