
Hi Eran,
On 03/01/2018 14:58, Eran Matityahu wrote:
Hi Uri.
Hello Eran,
On 01/03/2018 12:53 PM, Eran Matityahu wrote:
Use only one SPL MMC device, similarly to the iMX6 code
What is the reason for not using MMC2?
The reason is so that you won't have to initialize more than one MMC device in SPL. Also, to be consistent with the iMX6 SPL code.
Signed-off-by: Eran Matityahu eran.m@variscite.com
arch/arm/mach-imx/spl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index d0d1b73aa6..6b5bd8990c 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -106,10 +106,9 @@ u32 spl_boot_device(void) switch (boot_device_spl) { case SD1_BOOT: case MMC1_BOOT:
return BOOT_DEVICE_MMC1; case SD2_BOOT: case MMC2_BOOT:
return BOOT_DEVICE_MMC2;
return BOOT_DEVICE_MMC1; case SPI_NOR_BOOT: return BOOT_DEVICE_SPI; default:
The reason to have spl_boot_device() is not to initialize more as one MMC device, but to find which storage contains the next image to be started (u-boot.img). This is generally (but not in all projects) the same storage from where the BootROM has loaded SPL.
According to this, this patch seems wrong. If SPL / u-boot.img are stored on MMC2 (and maybe MMC2 is the only MMC device for the board), your patch breaks booting.
If you have special case, you can write a board_boot_order() in your board code to overwrite the behavior.
Best regards, Stefano Babic