summaryrefslogtreecommitdiff
path: root/include/configs/TQM85xx.h
diff options
context:
space:
mode:
authorWolfgang Grandegger <wg@grandegger.com>2008-06-05 13:12:02 +0200
committerAndrew Fleming-AFLEMING <afleming@freescale.com>2008-06-10 23:57:43 -0500
commit46346f27cda6fd025a496bde8f2d4aeee04aca5f (patch)
tree12f5b0ff74c86a5460b5a02be209bf6c68f463fb /include/configs/TQM85xx.h
parent5d5bd838f76eade22c0ea40a500389f924d0da36 (diff)
TQM85xx: Support for Spansion 'N' type flashes added
The 'N' type Spansion flashes (S29GLxxxN series) have bigger sectors, than the formerly used 'M' types (S29GLxxxM series), so the flash layout needs to be changed -> new start address of the environment. The macro definition CONFIG_TQM_FLASH_N_TYPE is undefined by default and must be defined for boards with 'N' type flashes. Signed-off-by: Martin Krause <martin.krause@tqs.de> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Diffstat (limited to 'include/configs/TQM85xx.h')
-rw-r--r--include/configs/TQM85xx.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h
index f0e73184f46..432c155a85f 100644
--- a/include/configs/TQM85xx.h
+++ b/include/configs/TQM85xx.h
@@ -109,6 +109,13 @@
#endif /* CONFIG_TQM8541 || CONFIG_TQM8555 */
/*
+ * Old TQM85xx boards have 'M' type Spansion Flashes from the S29GLxxxM
+ * series while new boards have 'N' type Flashes from the S29GLxxxN
+ * series, which have bigger sectors: 2 x 128 instead of 2 x 64 KB.
+ */
+#undef CONFIG_TQM_FLASH_N_TYPE
+
+/*
* Flash on the Local Bus
*/
#define CFG_FLASH0 0xFC000000
@@ -151,7 +158,7 @@
#define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
#define CFG_MONITOR_LEN (256 * 1024) /* Reserve 256kB for Mon */
-#define CFG_MALLOC_LEN (128 * 1024) /* Reserved for malloc */
+#define CFG_MALLOC_LEN (256 * 1024) /* Reserved for malloc */
/* Serial Port */
#if defined(CONFIG_TQM8560)
@@ -351,10 +358,15 @@
* Environment
*/
#define CFG_ENV_IS_IN_FLASH 1
-#define CFG_ENV_ADDR (CFG_MONITOR_BASE - 0x20000)
-#define CFG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */
+
+#ifdef CONFIG_TQM_FLASH_N_TYPE
+#define CFG_ENV_SECT_SIZE 0x40000 /* 256K (one sector) for env */
+#else /* !CONFIG_TQM_FLASH_N_TYPE */
+#define CFG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) for env */
+#endif /* CONFIG_TQM_FLASH_N_TYPE */
+#define CFG_ENV_ADDR (CFG_MONITOR_BASE - CFG_ENV_SECT_SIZE)
#define CFG_ENV_SIZE 0x2000
-#define CFG_ENV_ADDR_REDUND (CFG_ENV_ADDR-CFG_ENV_SECT_SIZE)
+#define CFG_ENV_ADDR_REDUND (CFG_ENV_ADDR - CFG_ENV_SECT_SIZE)
#define CFG_ENV_SIZE_REDUND (CFG_ENV_SIZE)
#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */