aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-06-15 13:57:00 -0400
committerTom Rini <trini@konsulko.com>2017-06-23 10:38:03 -0400
commit207f981b5667817e78155a477ac5cfb0cf0bd0b5 (patch)
tree6c0ad7b6a16f45947b2858bbef6ae33f2712313d /arch
parent4fd79ac9afd62ce0327ff136993270b199fdb408 (diff)
downloadu-boot-207f981b5667817e78155a477ac5cfb0cf0bd0b5.zip
u-boot-207f981b5667817e78155a477ac5cfb0cf0bd0b5.tar.gz
u-boot-207f981b5667817e78155a477ac5cfb0cf0bd0b5.tar.bz2
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. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/boot-common.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
index 29c8f23..b77506d 100644
--- a/arch/arm/mach-omap2/boot-common.c
+++ b/arch/arm/mach-omap2/boot-common.c
@@ -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