tegra2: Enable SPI environment on Seaboard
authorSimon Glass <sjg@chromium.org>
Sat, 5 Nov 2011 04:46:48 +0000 (04:46 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 24 Dec 2011 09:23:31 +0000 (10:23 +0100)
This uses the SPI flash on Seaboard to store an 8KB environment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
include/configs/harmony.h
include/configs/seaboard.h
include/configs/tegra2-common.h

index 89e4911244c1052ae84359552e6ec3dad3ff8386..ce0ae9fe1f8784b0d9b86511ac374f56201e082d 100644 (file)
@@ -58,4 +58,7 @@
 #define CONFIG_EFI_PARTITION
 #define CONFIG_CMD_EXT2
 #define CONFIG_CMD_FAT
+
+/* Environment not stored */
+#define CONFIG_ENV_IS_NOWHERE
 #endif /* __CONFIG_H */
index 7e8c8cc51e9c24c5274442fba804ee4bb6df03f4..261f9521add4d8e3153106c19d5fe240f09fda8d 100644 (file)
@@ -52,6 +52,7 @@
 #define CONFIG_SF_DEFAULT_MODE         SPI_MODE_0
 #define CONFIG_CMD_SPI
 #define CONFIG_CMD_SF
+#define CONFIG_SPI_FLASH_SIZE          (4 << 20)
 
 /* SD/MMC */
 #define CONFIG_MMC
 #define CONFIG_EFI_PARTITION
 #define CONFIG_CMD_EXT2
 #define CONFIG_CMD_FAT
+
+/* 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       (CONFIG_SPI_FLASH_SIZE - CONFIG_ENV_SECT_SIZE)
 #endif /* __CONFIG_H */
index e233b1c83de832386267987d5c80273313d8af68..ffea4013eb4a3aeb10a261489a4c50637029bacb 100644 (file)
@@ -51,8 +51,7 @@
 #define CONFIG_OF_LIBFDT               /* enable passing of devicetree */
 
 /* Environment */
-#define CONFIG_ENV_IS_NOWHERE
-#define CONFIG_ENV_SIZE                        0x20000 /* Total Size Environment */
+#define CONFIG_ENV_SIZE                        0x2000  /* Total Size Environment */
 
 /*
  * Size of malloc() pool