summaryrefslogtreecommitdiff
path: root/board/engicam/common/spl.c
diff options
context:
space:
mode:
authorJagan Teki <jagannadh.teki@gmail.com>2017-11-21 00:02:16 +0530
committerStefano Babic <sbabic@denx.de>2017-11-27 10:36:40 +0100
commit52aaddd6f415397bb2eae0d68a8cc1c5c4a98bb3 (patch)
tree9370094a6c8c59b0c5fd95cf7619797a3839f43b /board/engicam/common/spl.c
parent539b1e228f0dda602e4b64ccbdf0d338988dec6c (diff)
i.MX6: engicam: Add imx6q/imx6ul boards for existing boards
Add new board names for existing board support imx6q - icore and icore_rqs boards imx6ul - geam6ul and isiot boards Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'board/engicam/common/spl.c')
-rw-r--r--board/engicam/common/spl.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c
index f8ae3acb0d4..6e2389dd4b4 100644
--- a/board/engicam/common/spl.c
+++ b/board/engicam/common/spl.c
@@ -55,6 +55,32 @@ int board_fit_config_name_match(const char *name)
}
#endif
+#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
+
#ifdef CONFIG_SPL_OS_BOOT
int spl_start_uboot(void)
{