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

Piotr Zierhoffer
2015-07-16T11:25:15Z

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@antmicro.com>
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@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