[U-Boot] [PATCH] imx_common: spl: Fix SPL boot from SD card

Fabio Estevam festevam at gmail.com
Fri Dec 2 16:03:37 CET 2016


Hi Marcin,

On Fri, Dec 2, 2016 at 12:11 PM, Marcin Niestroj
<m.niestroj at grinn-global.com> wrote:

> Why is BOOT_DEVICE_MMC1 expected here? As I see in Udoo neo schematics
> the SD card is connected to uSDHC2 port, because uSDHC1 is used for
> something else.

Yes, Udoo Neo boots from the SDHC2 port.

However BOOT_DEVICE_MMC1 does not mean "boot from the SDHC1 port".
BOOT_DEVICE_MMC1 just tells SPL to boot from the first registered mmc device.

Please take a look at common/spl/spl_mmc.c

int spl_mmc_get_device_index(u32 boot_device)
{
  switch (boot_device) {
  case BOOT_DEVICE_MMC1:
      return 0;
  case BOOT_DEVICE_MMC2:
  case BOOT_DEVICE_MMC2_2:
    return 1;
}

,so we should return BOOT_DEVICE_MMC1 as we always did.

mx6cuboxi is also broken for the same reason.

If you took the assumption that in "BOOT_DEVICE_MMC1 = Boot from SDHC1
port" in 54e4fcfa3c749a78 ("ARM: mx6: add MMC2 boot device detection
support in SPL") I suggest we need to revert it.


More information about the U-Boot mailing list