Patchwork [U-Boot,2/5] am335x_evm: Add SPI environment variables

login
register
mail settings
Submitter Tom Rini
Date Feb. 8, 2013, 9:20 p.m.
Message ID <1360358415-10462-3-git-send-email-trini@ti.com>
Download mbox | patch
Permalink /patch/219310/
State Accepted
Delegated to: Tom Rini
Headers show

Comments

Tom Rini - Feb. 8, 2013, 9:20 p.m.
From: Chase Maupin <Chase.Maupin@ti.com>

* Added variables to support SPI booting
* Note that the first 512KiB are reserved for 4 copies of SPL.

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
---
 include/configs/am335x_evm.h |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

Patch

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 8e01574..d9e8264 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -74,6 +74,15 @@ 
 		"${optargs} " \
 		"root=${nandroot} " \
 		"rootfstype=${nandrootfstype}\0" \
+	"spiroot=/dev/mtdblock4 rw\0" \
+	"spirootfstype=jffs2\0" \
+	"spisrcaddr=0xe0000\0" \
+	"spiimgsize=0x362000\0" \
+	"spibusno=0\0" \
+	"spiargs=setenv bootargs console=${console} " \
+		"${optargs} " \
+		"root=${spiroot} " \
+		"rootfstype=${spirootfstype}\0" \
 	"bootenv=uEnv.txt\0" \
 	"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
 	"importbootenv=echo Importing environment from mmc ...; " \
@@ -92,6 +101,11 @@ 
 		"run nandargs; " \
 		"nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; " \
 		"bootm ${loadaddr}\0" \
+	"spiboot=echo Booting from spi ...; " \
+		"run spiargs; " \
+		"sf probe ${spibusno}:0; " \
+		"sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; " \
+		"bootm ${loadaddr}\0" \
 	"ramboot=echo Booting from ramdisk ...; " \
 		"run ramargs; " \
 		"bootm ${loadaddr}\0" \