From f49acb763ec7165d634a119626620c596d74e419 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Fri, 17 May 2019 02:41:03 -0700 Subject: [PATCH] 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 --- arch/arm/mach-imx/mx6/soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index d010f90d68..2cef9065b4 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -686,7 +686,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] */ -- 2.17.1