diff options
Diffstat (limited to 'board/samsung/odroid/odroid.c')
-rw-r--r-- | board/samsung/odroid/odroid.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c index bff6ac9..ae41c29 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 @@ -424,10 +427,6 @@ int exynos_early_init_f(void) int exynos_init(void) { - /* The last MB of memory is reserved for secure firmware */ - gd->ram_size -= SZ_1M; - gd->bd->bi_dram[CONFIG_NR_DRAM_BANKS - 1].size -= SZ_1M; - board_gpio_init(); return 0; |