]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: icore-rqs: Fix mmc get env device
authorJagan Teki <jagannadh.teki@gmail.com>
Mon, 20 Nov 2017 18:32:15 +0000 (00:02 +0530)
committerStefano Babic <sbabic@denx.de>
Mon, 27 Nov 2017 09:36:40 +0000 (10:36 +0100)
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 <jagan@amarulasolutions.com>
arch/arm/dts/imx6qdl-icore-rqs.dtsi
board/engicam/icorem6_rqs/icorem6_rqs.c

index 65cbf5abb390c1f092b65b9577e6702babf34b94..816cdce2f36c4150d8c15b3bcf48c1afad2f1602 100644 (file)
 #include <dt-bindings/clock/imx6qdl-clock.h>
 
 / {
+       aliases {
+               mmc1 = &usdhc3;
+               mmc2 = &usdhc4;
+       };
+
        memory {
                reg = <0x10000000 0x80000000>;
        };
index cd73dfa9babbe6c02c540655653f46b0aedc8824..a55a754bc7aa015f64bb572b277df69ddc08bcc8 100644 (file)
@@ -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