From: Ye Li Date: Fri, 17 May 2019 09:41:03 +0000 (-0700) Subject: MLK-19869-2 imx6: fix mmc_get_boot_dev issue when booting from USB X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~518 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=15b1d44fd2c56e201eeb8276b6359e6c21517ad0;p=u-boot.git MLK-19869-2 imx6: fix mmc_get_boot_dev issue when booting from USB The mmc_get_boot_dev reads from SRC SBMR register. When booting with USB serial download, this function does not return correctly. Because SBMR won't reflect the USB boot. The patch adds USB boot checking to this function to fix the issue. Signed-off-by: Ye Li (cherry picked from commit f49acb763ec7165d634a119626620c596d74e419) (cherry picked from commit f6706d17af5ce154e325b7f221ec3d74dfca2c56) --- diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index 1b56a15edf..9dfbfb886e 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -708,7 +708,7 @@ static int mmc_get_boot_dev(void) bootsel = (soc_sbmr & 0x000000FF) >> 6; /* No boot from sd/mmc */ - if (bootsel != 1) + if (is_usb_boot() || bootsel != 1) return -1; /* BOOT_CFG2[3] and BOOT_CFG2[4] */