summaryrefslogtreecommitdiff
path: root/board/samsung
diff options
context:
space:
mode:
authorInha Song <ideal.song@samsung.com>2015-02-17 12:24:12 +0100
committerMarek Vasut <marex@denx.de>2015-02-25 17:47:02 +0100
commit2474b7f1499e81b68cf1b4610dd7ee2cd0c9ba88 (patch)
tree67cf42e5c4c70f13c0c5942474533cdbc310f12a /board/samsung
parent899a52821515d79f9e4e525fd3098bdb574062ed (diff)
downloadu-boot-imx-2474b7f1499e81b68cf1b4610dd7ee2cd0c9ba88.zip
u-boot-imx-2474b7f1499e81b68cf1b4610dd7ee2cd0c9ba88.tar.gz
u-boot-imx-2474b7f1499e81b68cf1b4610dd7ee2cd0c9ba88.tar.bz2
odroid: adjust get_dfu_alt_*() functions to new declarations
This change is required after updated dfu_alt_system/boot declarations. Signed-off-by: Inha Song <ideal.song@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [Test HW: Odroid U3 (Exynos 4412)] Acked-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'board/samsung')
-rw-r--r--board/samsung/odroid/odroid.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c
index bff6ac9..6f4b8ca 100644
--- a/board/samsung/odroid/odroid.c
+++ b/board/samsung/odroid/odroid.c
@@ -15,6 +15,7 @@
#include <power/pmic.h>
#include <power/max77686_pmic.h>
#include <errno.h>
+#include <mmc.h>
#include <usb.h>
#include <usb/s3c_udc.h>
#include <samsung/misc.h>
@@ -61,27 +62,29 @@ const char *get_board_type(void)
#endif
#ifdef CONFIG_SET_DFU_ALT_INFO
-char *get_dfu_alt_system(void)
+char *get_dfu_alt_system(char *interface, char *devstr)
{
return getenv("dfu_alt_system");
}
-char *get_dfu_alt_boot(void)
+char *get_dfu_alt_boot(char *interface, char *devstr)
{
+ struct mmc *mmc;
char *alt_boot;
+ int dev_num;
+
+ dev_num = simple_strtoul(devstr, NULL, 10);
+
+ mmc = find_mmc_device(dev_num);
+ if (!mmc)
+ return NULL;
+
+ if (mmc_init(mmc))
+ return NULL;
+
+ alt_boot = IS_SD(mmc) ? CONFIG_DFU_ALT_BOOT_SD :
+ CONFIG_DFU_ALT_BOOT_EMMC;
- switch (get_boot_mode()) {
- case BOOT_MODE_SD:
- alt_boot = CONFIG_DFU_ALT_BOOT_SD;
- break;
- case BOOT_MODE_EMMC:
- case BOOT_MODE_EMMC_SD:
- alt_boot = CONFIG_DFU_ALT_BOOT_EMMC;
- break;
- default:
- alt_boot = NULL;
- break;
- }
return alt_boot;
}
#endif