From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jagan Teki Date: Fri, 27 Jan 2017 15:12:37 +0100 Subject: [U-Boot] [PATCH v2 09/15] i.MX6UL: isiot: Switch the mmc env based on devno In-Reply-To: <1485526363-3834-1-git-send-email-jagan@openedev.com> References: <1485526363-3834-1-git-send-email-jagan@openedev.com> Message-ID: <1485526363-3834-10-git-send-email-jagan@openedev.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Jagan Teki Add board_mmc_get_env_dev Switch the mmc env based on the mmc devno, instead of separately defining a config item in include/configs using board_mmc_get_env_dev - devno 0: sd/esd - devno 1: mmc/emmc Cc: Stefano Babic Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- board/engicam/isiotmx6ul/isiotmx6ul.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/board/engicam/isiotmx6ul/isiotmx6ul.c b/board/engicam/isiotmx6ul/isiotmx6ul.c index 920d317..df432a1 100644 --- a/board/engicam/isiotmx6ul/isiotmx6ul.c +++ b/board/engicam/isiotmx6ul/isiotmx6ul.c @@ -105,6 +105,12 @@ static void setup_gpmi_nand(void) #endif /* CONFIG_NAND_MXS */ #ifdef CONFIG_ENV_IS_IN_MMC +int board_mmc_get_env_dev(int devno) +{ + /* dev 0 for SD/eSD, dev 1 for MMC/eMMC */ + return (devno == 0) ? 0 : 1; +} + static void mmc_late_init(void) { char cmd[32]; -- 1.9.1