engicam: imx6q: Return mmc dev 0 for icore
authorJagan Teki <jagannadh.teki@gmail.com>
Mon, 20 Nov 2017 18:32:17 +0000 (00:02 +0530)
committerStefano Babic <sbabic@denx.de>
Mon, 27 Nov 2017 09:36:40 +0000 (10:36 +0100)
icorem6 has sd on usdhci1 which is devno 0 so return proper
devno from board_mmc_get_env_dev for icorem6 and icorem_6rqs

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
board/engicam/imx6q/imx6q.c

index bb0c866df6475582835e1e0bd66707d52ca66706..fe37088b49119f1c409f6e431682e96e62b3f75b 100644 (file)
@@ -193,6 +193,7 @@ void setup_display(void)
 #ifdef CONFIG_ENV_IS_IN_MMC
 int board_mmc_get_env_dev(int devno)
 {
-       return devno - 1;
+       /* i.CoreM6 RQS has USDHC3 for SD and USDHC4 for eMMC */
+       return (devno == 0) ? 0: (devno - 1);
 }
 #endif