imx6ul: opos6ul: in Serial Downloader boot mode use ymodem
authorSébastien Szymanski <sebastien.szymanski@armadeus.com>
Tue, 17 Apr 2018 15:29:32 +0000 (17:29 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 26 Apr 2018 07:34:16 +0000 (09:34 +0200)
When booting in Serial Downloader mode load the U-Boot image using
ymodem.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
arch/arm/mach-imx/mx6/opos6ul.c

index ef70a7d32301c1b1f5a816339250f9d403bc095f..5d39c0bc1bd48ffad49b1165463e0e1265b840d2 100644 (file)
@@ -208,6 +208,16 @@ static struct mx6_ddr3_cfg mem_ddr = {
        .trasmin = 3750,
 };
 
+void board_boot_order(u32 *spl_boot_list)
+{
+       unsigned int bmode = readl(&src_base->sbmr2);
+
+       if (((bmode >> 24) & 0x03) == 0x01) /* Serial Downloader */
+               spl_boot_list[0] = BOOT_DEVICE_UART;
+       else
+               spl_boot_list[0] = spl_boot_device();
+}
+
 static void ccgr_init(void)
 {
        struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;