From: Peng Fan Date: Mon, 19 Aug 2019 09:43:36 +0000 Subject: [U-Boot] [PATCH v2 22/26] imx: mmc_env: update runtime SD/MMC boot env device In-Reply-To: <20190819095817.22107-1-peng.fan@nxp.com> References: <20190819095817.22107-1-peng.fan@nxp.com> Message-ID: <20190819095817.22107-23-peng.fan@nxp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de When DM_MMC enabled, the USDHC index in U-Boot is the USDHC port. To directly return devno, we could avoid add board specific code. Signed-off-by: Peng Fan --- arch/arm/mach-imx/mmc_env.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-imx/mmc_env.c b/arch/arm/mach-imx/mmc_env.c index 9c822f721c..addb50f538 100644 --- a/arch/arm/mach-imx/mmc_env.c +++ b/arch/arm/mach-imx/mmc_env.c @@ -11,6 +11,9 @@ __weak int board_mmc_get_env_dev(int devno) { + if (CONFIG_IS_ENABLED(DM_MMC)) + return devno; + return CONFIG_SYS_MMC_ENV_DEV; } -- 2.16.4