board: samsung: configure emmc_dev environment
authorChanho Park <chanho61.park@samsung.com>
Tue, 1 Dec 2015 12:18:17 +0000 (21:18 +0900)
committerChanho Park <chanho61.park@samsung.com>
Wed, 2 Dec 2015 02:39:17 +0000 (11:39 +0900)
This patch enable to set the emmc_dev number because it's
varied by boot order. If the board is booted from sdcard,
the emmc device number will be 1 not default 0. Thus, I
set a "emmc_dev" environment to retrieve the number anywhere.

Change-Id: I9324f855151bcfee85e351749ae91cab51ec4a22
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
board/samsung/espresso3250/espresso3250.c
board/samsung/smdk5422/smdk5422.c

index 3b9b3b76f584dfe84e7327adda3269c34cacd276..96607bfe0c234530807cdb6c5f4aed05c84ebfad 100644 (file)
@@ -204,6 +204,9 @@ int board_mmc_init(bd_t *bis)
                return err;
        }
 
+       if (OmPin == BOOT_MMCSD)
+               setenv("emmc_dev", "1");
+
        if (OmPin == BOOT_EMMC_4_4 || OmPin == BOOT_EMMC) {
 #ifdef USE_MMC0
                set_mmc_clk(PERIPH_ID_SDMMC0, 0);
index ca9dbdd4e9f7e8323eb44943afa8061a56ca1293..b91c89c3ecec7109df06a23d67ad05246ac01f8b 100644 (file)
@@ -323,6 +323,9 @@ int board_mmc_init(bd_t *bis)
        }
 
        switch (OmPin) {
+       case BOOT_MMCSD:
+               setenv("emmc_dev", "1");
+               break;
        case BOOT_EMMC_4_4:
 #if defined(USE_MMC0)
                set_mmc_clk(PERIPH_ID_SDMMC0, 1);