Skip to contentSkip to conversation

ti816x: Add additional boot device detection logic

PATCH In review Tom Rini 1 participant 2 messages Jun 15, 2017 – Jun 24, 2017

Subsystems (3)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 ti816x: Add additional boot device detection logic

It has been observed that between PG1.0 and PG2.0/2.1 depending on which device we boot from, we may see a different value here than is documented in the TRM. Update the values for NAND and MMC1 based on real life usage on each revision.

---
 arch/arm/mach-omap2/boot-common.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm/mach-omap2/boot-common.c +17 -0
index 7ae3d8041c48..4fdf92d1713b 100644
@@ -65,6 +65,23 @@ void save_omap_boot_params(void)
 	if (boot_device == BOOT_DEVICE_QSPI_4)
 		boot_device = BOOT_DEVICE_SPI;
 #endif
+#ifdef CONFIG_TI816X
+	/*
+	 * On PG2.0 and later TI816x the values we get when booting are not the
+	 * same as on PG1.0, which is what the defines are based on.  Update
+	 * them as needed.
+	 */
+	if (get_cpu_rev() != 1) {
+		if (boot_device == 0x05) {
+			omap_boot_params->boot_device = BOOT_DEVICE_NAND;
+			boot_device = BOOT_DEVICE_NAND;
+		}
+		if (boot_device == 0x08) {
+			omap_boot_params->boot_device = BOOT_DEVICE_MMC1;
+			boot_device = BOOT_DEVICE_MMC1;
+		}
+	}
+#endif
 	/*
 	 * When booting from peripheral booting, the boot device is not usable
 	 * as-is (unless there is support for it), so the boot device is instead
Signature · 1 line
1.9.1
author
#1 lore raw
Quoted 6 lines · Tom Rini

It has been observed that between PG1.0 and PG2.0/2.1 depending on which device we boot from, we may see a different value here than is documented in the TRM. Update the values for NAND and MMC1 based on real life usage on each revision.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170624/bf3991a1/attachment.sig>