Skip to contentSkip to conversation

imx: spl: Partially revert "spl: eMMC/SD: Provide one __weak spl_boot_mode() function"

PATCH New Fabio Estevam 4 participants 4 messages Feb 15, 2018 – Feb 24, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 imx: spl: Partially revert "spl: eMMC/SD: Provide one __weak spl_boot_mode() function"

Commit d695d6627803 ("spl: eMMC/SD: Provide one __weak spl_boot_mode() function") breaks the boot on several i.MX6 boards,
such as cuboxi and wandboard:

U-Boot SPL 2018.03-rc1-00212-g48914fc119 (Feb 10 2018 - 11:04:33 +1300) Trying to boot from MMC1
Failed to mount ext2 filesystem...
spl_load_image_ext: ext4fs mount err - 0

Partially revert it so that we can boot U-Boot again on these i.MX6 platforms.

---
Changes since v2:
- Do a partiall revert instead of full revert (Lukasz)

 arch/arm/mach-imx/spl.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
arch/arm/mach-imx/spl.c +23 -0
index a9079fc..b2521b2 100644
@@ -132,6 +132,29 @@ int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
 }
 #endif
 
+#if defined(CONFIG_SPL_MMC_SUPPORT)
+/* called from spl_mmc to see type of boot mode for storage (RAW or FAT) */
+u32 spl_boot_mode(const u32 boot_device)
+{
+	switch (spl_boot_device()) {
+	/* for MMC return either RAW or FAT mode */
+	case BOOT_DEVICE_MMC1:
+	case BOOT_DEVICE_MMC2:
+#if defined(CONFIG_SPL_FAT_SUPPORT)
+		return MMCSD_MODE_FS;
+#elif defined(CONFIG_SUPPORT_EMMC_BOOT)
+		return MMCSD_MODE_EMMCBOOT;
+#else
+		return MMCSD_MODE_RAW;
+#endif
+		break;
+	default:
+		puts("spl: ERROR:  unsupported device\n");
+		hang();
+	}
+}
+#endif
+
 #if defined(CONFIG_SECURE_BOOT)
 
 /*
Signature · 1 line
2.7.4
#1 lore raw

PATCH v3 1/1 imx: spl: Partially revert "spl: eMMC/SD: Provide one __weak spl_boot_mode() function"

2018-02-15 12:41 GMT-02:00 Fabio Estevam <[email protected]>:

Quoted 9 lines

Commit d695d6627803 ("spl: eMMC/SD: Provide one __weak spl_boot_mode() function") breaks the boot on several i.MX6 boards,
such as cuboxi and wandboard:

U-Boot SPL 2018.03-rc1-00212-g48914fc119 (Feb 10 2018 - 11:04:33 +1300) Trying to boot from MMC1
Failed to mount ext2 filesystem...
spl_load_image_ext: ext4fs mount err - 0

Quoted 5 lines

Partially revert it so that we can boot U-Boot again on these i.MX6 platforms.

#2 lore raw

PATCH v3 1/1 imx: spl: Partially revert "spl: eMMC/SD: Provide one __weak spl_boot_mode() function"

Quoted 10 lines · Breno Matheus Lima

2018-02-15 12:41 GMT-02:00 Fabio Estevam <[email protected]>:

Quoted 9 lines

Commit d695d6627803 ("spl: eMMC/SD: Provide one __weak spl_boot_mode() function") breaks the boot on several i.MX6 boards,
such as cuboxi and wandboard:

U-Boot SPL 2018.03-rc1-00212-g48914fc119 (Feb 10 2018 - 11:04:33 +1300) Trying to boot from MMC1
Failed to mount ext2 filesystem...
spl_load_image_ext: ext4fs mount err - 0

Quoted 7 lines
Quoted 5 lines

Partially revert it so that we can boot U-Boot again on these i.MX6 platforms.

Was this intentionally not in your PR, Stefano? Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180224/91a545d4/attachment.sig>
#3 lore raw

PATCH v3 1/1 imx: spl: Partially revert "spl: eMMC/SD: Provide one __weak spl_boot_mode() function"

Quoted 14 lines · Tom Rini
Quoted 13 lines · Breno Matheus Lima

2018-02-15 12:41 GMT-02:00 Fabio Estevam <[email protected]>:

Quoted 12 lines

Commit d695d6627803 ("spl: eMMC/SD: Provide one __weak spl_boot_mode() function") breaks the boot on several i.MX6 boards,
such as cuboxi and wandboard:

U-Boot SPL 2018.03-rc1-00212-g48914fc119 (Feb 10 2018 - 11:04:33 +1300) Trying to boot from MMC1
Failed to mount ext2 filesystem...
spl_load_image_ext: ext4fs mount err - 0

Partially revert it so that we can boot U-Boot again on these i.MX6 platforms.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Was this intentionally not in your PR, Stefano? Thanks!

No, it was not intentionally :-(. I pick it up.

Regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================