From: Jagan Teki Date: Mon, 20 Nov 2017 18:32:15 +0000 (+0530) Subject: board: icore-rqs: Fix mmc get env device X-Git-Tag: v2018.01-rc1~66^2~3 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=539b1e228f0dda602e4b64ccbdf0d338988dec6c;p=oweals%2Fu-boot.git board: icore-rqs: Fix mmc get env device As per USDHC boot eFUSE descriptions: USDHC3 => devno 2 USDHC4 => devno 3 Linux will detect mmc0, mmc1, mmc2 based on the status "okay" on usdhc so imx6qdl-icore-rqs.dtsi has enabled usdhc1, usdhc3 and usdhc4.But U-Boot can detect based on the aliases so add mmc1, mmc2 for usdhc3 and usdhc4 respectively and return the board_mmc_get_env_dev by subtracting -1 Signed-off-by: Jagan Teki --- diff --git a/arch/arm/dts/imx6qdl-icore-rqs.dtsi b/arch/arm/dts/imx6qdl-icore-rqs.dtsi index 65cbf5abb3..816cdce2f3 100644 --- a/arch/arm/dts/imx6qdl-icore-rqs.dtsi +++ b/arch/arm/dts/imx6qdl-icore-rqs.dtsi @@ -43,6 +43,11 @@ #include / { + aliases { + mmc1 = &usdhc3; + mmc2 = &usdhc4; + }; + memory { reg = <0x10000000 0x80000000>; }; diff --git a/board/engicam/icorem6_rqs/icorem6_rqs.c b/board/engicam/icorem6_rqs/icorem6_rqs.c index cd73dfa9ba..a55a754bc7 100644 --- a/board/engicam/icorem6_rqs/icorem6_rqs.c +++ b/board/engicam/icorem6_rqs/icorem6_rqs.c @@ -13,7 +13,7 @@ DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_ENV_IS_IN_MMC int board_mmc_get_env_dev(int devno) { - return devno; + return devno - 1; } #endif