summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/spl/spl_nand.c7
-rw-r--r--drivers/mtd/nand/Kconfig8
2 files changed, 15 insertions, 0 deletions
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 7cf0d1b986..0e35e0fd6b 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -134,6 +134,13 @@ int spl_nand_load_image(void)
#endif
/* Load u-boot */
err = spl_nand_load_element(CONFIG_SYS_NAND_U_BOOT_OFFS, header);
+#ifdef CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND
+#if CONFIG_SYS_NAND_U_BOOT_OFFS != CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND
+ if (err)
+ err = spl_nand_load_element(CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND,
+ header);
+#endif
+#endif
nand_deselect();
return err;
}
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 5fe169f6ce..8c46a2ff8e 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -117,6 +117,14 @@ config SYS_NAND_U_BOOT_OFFS
Set the offset from the start of the nand where u-boot should be
loaded from.
+config SYS_NAND_U_BOOT_OFFS_REDUND
+ hex "Location in NAND to read U-Boot from"
+ default SYS_NAND_U_BOOT_OFFS
+ depends on SYS_NAND_U_BOOT_LOCATIONS
+ help
+ Set the offset from the start of the nand where the redundant u-boot
+ should be loaded from.
+
config SPL_NAND_DENALI
bool "Support Denali NAND controller for SPL"
help
OpenPOWER on IntegriCloud