int board_late_init(void) { switch ((imx6_src_get_boot_mode() & IMX6_BMODE_MASK) >> IMX6_BMODE_SHIFT) { case IMX6_BMODE_SD: case IMX6_BMODE_ESD: case IMX6_BMODE_MMC: case IMX6_BMODE_EMMC: #ifdef CONFIG_ENV_IS_IN_MMC mmc_late_init(); #endif env_set("modeboot", "mmcboot"); break; case IMX6_BMODE_NAND_MIN ... IMX6_BMODE_NAND_MAX: env_set("modeboot", "nandboot"); break; default: env_set("modeboot", ""); break; } if (is_mx6ul()) env_set("console", "ttymxc0"); else env_set("console", "ttymxc3"); setenv_fdt_file(); return 0; }
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; }