diff mbox

[U-Boot,u-boot,3/3] am43xx_evm: Enable NAND boot

Message ID 1433497426-16221-1-git-send-email-rogerq@ti.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Roger Quadros June 5, 2015, 9:43 a.m. UTC
From: Tom Rini <trini@ti.com>

Enable booting from NAND on the am437xx-evm.

Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 include/configs/am43xx_evm.h | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

Comments

Tom Rini June 5, 2015, 12:48 p.m. UTC | #1
On Fri, Jun 05, 2015 at 12:43:46PM +0300, Roger Quadros wrote:

> From: Tom Rini <trini@ti.com>
> 
> Enable booting from NAND on the am437xx-evm.
> 
> Signed-off-by: Tom Rini <trini@ti.com>
> Signed-off-by: Roger Quadros <rogerq@ti.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini June 13, 2015, 2:10 a.m. UTC | #2
On Fri, Jun 05, 2015 at 12:43:46PM +0300, Roger Quadros wrote:

> From: Tom Rini <trini@ti.com>
> 
> Enable booting from NAND on the am437xx-evm.
> 
> Signed-off-by: Tom Rini <trini@ti.com>
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index 482a99a..fce34fa 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -295,13 +295,15 @@ 
 			"setenv fdtfile am437x-idk-evm.dtb; fi; " \
 		"if test $fdtfile = undefined; then " \
 			"echo WARNING: Could not determine device tree; fi; \0" \
+	NANDARGS \
 	NETARGS \
 	DFUARGS \
 
 #define CONFIG_BOOTCOMMAND \
 	"run findfdt; " \
 	"run mmcboot;" \
-	"run usbboot;"
+	"run usbboot;" \
+	NANDBOOT \
 
 #endif
 
@@ -390,6 +392,24 @@ 
 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS	0x00300000 /* kernel offset */
 #define CONFIG_CMD_SPL_WRITE_SIZE	CONFIG_SYS_NAND_BLOCK_SIZE
 #endif
-#endif /* !CONFIG_NAND */
+#define NANDARGS \
+	"mtdids=" MTDIDS_DEFAULT "\0" \
+	"mtdparts=" MTDPARTS_DEFAULT "\0" \
+	"nandargs=setenv bootargs console=${console} " \
+		"${optargs} " \
+		"root=${nandroot} " \
+		"rootfstype=${nandrootfstype}\0" \
+	"nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,4096\0" \
+	"nandrootfstype=ubifs rootwait=1\0" \
+	"nandboot=echo Booting from nand ...; " \
+		"run nandargs; " \
+		"nand read ${fdtaddr} NAND.u-boot-spl-os; " \
+		"nand read ${loadaddr} NAND.kernel; " \
+		"bootz ${loadaddr} - ${fdtaddr}\0"
+#define NANDBOOT			"run nandboot; "
+#else /* !CONFIG_NAND */
+#define NANDARGS
+#define NANDBOOT
+#endif /* CONFIG_NAND */
 
 #endif	/* __CONFIG_AM43XX_EVM_H */