Patchwork [U-Boot,5/7] tegra: trimslice: store environment in SPI flash

login
register
mail settings
Submitter Stephen Warren
Date May 24, 2012, 9:38 p.m.
Message ID <1337895519-13502-5-git-send-email-swarren@wwwdotorg.org>
Download mbox | patch
Permalink /patch/161227/
State Accepted
Delegated to: Tom Warren
Headers show

Comments

Stephen Warren - May 24, 2012, 9:38 p.m.
From: Stephen Warren <swarren@nvidia.com>

The chosen flash offset matches Compulab's downstream U-Boot.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 include/configs/trimslice.h |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

Patch

diff --git a/include/configs/trimslice.h b/include/configs/trimslice.h
index 21b9ef2..dec9125 100644
--- a/include/configs/trimslice.h
+++ b/include/configs/trimslice.h
@@ -47,6 +47,14 @@ 
 
 #define CONFIG_BOARD_EARLY_INIT_F
 
+/* SPI */
+#define CONFIG_TEGRA2_SPI
+#define CONFIG_SPI_FLASH
+#define CONFIG_SPI_FLASH_WINBOND
+#define CONFIG_SF_DEFAULT_MODE		SPI_MODE_0
+#define CONFIG_CMD_SPI
+#define CONFIG_CMD_SF
+
 /* I2C */
 #define CONFIG_TEGRA_I2C
 #define CONFIG_SYS_I2C_INIT_BOARD
@@ -66,8 +74,12 @@ 
 #define CONFIG_CMD_EXT2
 #define CONFIG_CMD_FAT
 
-/* Environment not stored */
-#define CONFIG_ENV_IS_NOWHERE
+/* Environment in SPI */
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_SPI_MAX_HZ		48000000
+#define CONFIG_ENV_SPI_MODE		SPI_MODE_0
+#define CONFIG_ENV_SECT_SIZE		CONFIG_ENV_SIZE
+#define CONFIG_ENV_OFFSET		(512 * 1024)
 
 /* USB Host support */
 #define CONFIG_USB_EHCI