[U-Boot] [PATCH 4/4] sunxi: nand: Add information to sunxi that it was run from NAND in SPL

Piotr Zierhoffer pzierhoffer at antmicro.com
Thu Jul 16 13:25:15 CEST 2015


As SPL does not know which source to choose when booting U-Boot, choose
NAND if it is capable of doing so.

Signed-off-by: Peter Gielda <pgielda at antmicro.com>
Signed-off-by: Tomasz Gorochowik <tgorochowik at antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko at antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer at antmicro.com>

---

 arch/arm/cpu/armv7/sunxi/board.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
index 5f39aa0..e4b7d63 100644
--- a/arch/arm/cpu/armv7/sunxi/board.c
+++ b/arch/arm/cpu/armv7/sunxi/board.c
@@ -128,6 +128,9 @@ void s_init(void)
  */
 u32 spl_boot_device(void)
 {
+#ifdef CONFIG_SPL_NAND_SUPPORT
+	return BOOT_DEVICE_NAND;
+#else
 	/*
 	 * When booting from the SD card, the "eGON.BT0" signature is expected
 	 * to be found in memory at the address 0x0004 (see the "mksunxiboot"
@@ -148,6 +151,7 @@ u32 spl_boot_device(void)
 		return BOOT_DEVICE_MMC1;
 	else
 		return BOOT_DEVICE_BOARD;
+#endif
 }
 
 /* No confirmation data available in SPL yet. Hardcode bootmode */
-- 
2.3.6



More information about the U-Boot mailing list