aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorJagan Teki2017-02-24 15:45:22 +0530
committerStefano Babic2017-03-17 09:27:08 +0100
commit10fa3ee09b4219e96128bf56b380a47a2b905134 (patch)
tree0b03509cad6a1d6a597fff8fee091603d54eda6e /board
parentbaa0920dcb405a479218e7164ee9681a497a18f2 (diff)
imx6: icorem6_rqs: Update SPL board boot order for eMMC
SPL mmc device index is get based on the boot device, like - BOOT_DEVICE_MMC1 for mmc device 0 - BOOT_DEVICE_MMC2 for mmc device 1 Currently BOOT_DEVICE_MMC1 is setting both SD/eSD and MMC/eMMC boot devices in i.MX, So u-boot is loading from mmc device 0 even "if the board booting from SD/eSD or MMC/eMMC" So, this patch set BOOT_DEVICE_MMC2 for MMC/eMMC so for MMC/eMMC the u-boot is loading from mmc device 1 and the board file need to take care if the board have different mmc device order intialization. Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Reviewed by: Stefano Babic <sbabic@denx.de> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'board')
-rw-r--r--board/engicam/icorem6_rqs/icorem6_rqs.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/board/engicam/icorem6_rqs/icorem6_rqs.c b/board/engicam/icorem6_rqs/icorem6_rqs.c
index 2769177dd36..e3c520fedf3 100644
--- a/board/engicam/icorem6_rqs/icorem6_rqs.c
+++ b/board/engicam/icorem6_rqs/icorem6_rqs.c
@@ -125,6 +125,32 @@ int board_mmc_init(bd_t *bis)
return 0;
}
+
+#ifdef CONFIG_ENV_IS_IN_MMC
+void board_boot_order(u32 *spl_boot_list)
+{
+ u32 bmode = imx6_src_get_boot_mode();
+ u8 boot_dev = BOOT_DEVICE_MMC1;
+
+ switch ((bmode & IMX6_BMODE_MASK) >> IMX6_BMODE_SHIFT) {
+ case IMX6_BMODE_SD:
+ case IMX6_BMODE_ESD:
+ /* SD/eSD - BOOT_DEVICE_MMC1 */
+ break;
+ case IMX6_BMODE_MMC:
+ case IMX6_BMODE_EMMC:
+ /* MMC/eMMC */
+ boot_dev = BOOT_DEVICE_MMC2;
+ break;
+ default:
+ /* Default - BOOT_DEVICE_MMC1 */
+ printf("Wrong board boot order\n");
+ break;
+ }
+
+ spl_boot_list[0] = boot_dev;
+}
+#endif
#endif
/*