From 895ce33b05292ee7309c7cd75f2b22eaa554ab22 Mon Sep 17 00:00:00 2001 From: Chanho Park Date: Tue, 1 Dec 2015 21:18:17 +0900 Subject: [PATCH] board: samsung: configure emmc_dev environment 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 --- board/samsung/espresso3250/espresso3250.c | 3 +++ board/samsung/smdk5422/smdk5422.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/board/samsung/espresso3250/espresso3250.c b/board/samsung/espresso3250/espresso3250.c index 3b9b3b76f..96607bfe0 100644 --- a/board/samsung/espresso3250/espresso3250.c +++ b/board/samsung/espresso3250/espresso3250.c @@ -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); diff --git a/board/samsung/smdk5422/smdk5422.c b/board/samsung/smdk5422/smdk5422.c index ca9dbdd4e..b91c89c3e 100644 --- a/board/samsung/smdk5422/smdk5422.c +++ b/board/samsung/smdk5422/smdk5422.c @@ -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); -- 2.34.1