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 <ye.li@nxp.com>
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] */