summaryrefslogtreecommitdiff
path: root/include/configs
diff options
context:
space:
mode:
authorXie Xiaobo <r63061@freescale.com>2011-10-03 12:54:21 -0700
committerKumar Gala <galak@kernel.crashing.org>2011-10-09 17:57:54 -0500
commit2d4afd493b35e1a3b84cbf0a3098977c9f9b57ca (patch)
treef33ea6d3eaaef7d41620287d13cb976ade9db54d /include/configs
parent1116ebb9a766dff836759c0ffcbd699fb1447102 (diff)
downloadu-boot-imx-2d4afd493b35e1a3b84cbf0a3098977c9f9b57ca.zip
u-boot-imx-2d4afd493b35e1a3b84cbf0a3098977c9f9b57ca.tar.gz
u-boot-imx-2d4afd493b35e1a3b84cbf0a3098977c9f9b57ca.tar.bz2
powerpc/mpc8536ds: Save the env variables to SDcard and SPI flash
MPC8536DS offer booting from SDcard or SPI flash. This patch defined that u-boot can save the environment variables on SDcard or SPI flash when booting from the related device. The Env parameter region and linux kernel region have overlap in SPI-Flash, So change the Env param saving address. Signed-off-by: Xie Xiaobo <r63061@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'include/configs')
-rw-r--r--include/configs/MPC8536DS.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index 3c7e735..4b8cba2 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -644,10 +644,24 @@
#if defined(CONFIG_SYS_RAMBOOT)
#if defined(CONFIG_RAMBOOT_NAND)
- #define CONFIG_ENV_IS_IN_NAND 1
- #define CONFIG_ENV_SIZE CONFIG_SYS_NAND_BLOCK_SIZE
- #define CONFIG_ENV_OFFSET ((512 * 1024) + CONFIG_SYS_NAND_BLOCK_SIZE)
-#elif defined(CONFIG_RAMBOOT_SDCARD) || defined(CONFIG_RAMBOOT_SPIFLASH)
+#define CONFIG_ENV_IS_IN_NAND 1
+#define CONFIG_ENV_SIZE CONFIG_SYS_NAND_BLOCK_SIZE
+#define CONFIG_ENV_OFFSET ((512 * 1024) + CONFIG_SYS_NAND_BLOCK_SIZE)
+#define CONFIG_ENV_RANGE (3 * CONFIG_ENV_SIZE)
+#elif defined(CONFIG_RAMBOOT_SPIFLASH)
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_SPI_BUS 0
+#define CONFIG_ENV_SPI_CS 0
+#define CONFIG_ENV_SPI_MAX_HZ 10000000
+#define CONFIG_ENV_SPI_MODE 0
+#define CONFIG_ENV_SIZE 0x2000 /* 8KB */
+#define CONFIG_ENV_OFFSET 0xF0000
+#define CONFIG_ENV_SECT_SIZE 0x10000
+#elif defined(CONFIG_RAMBOOT_SDCARD)
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_ENV_SIZE 0x2000
+#define CONFIG_SYS_MMC_ENV_DEV 0
+#else
#define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
#define CONFIG_ENV_SIZE 0x2000