TQM85xx: add support for Spansion 'N' type flashes.
PATCH 1/1 TQM85xx: add support for Spansion 'N' type flashes.
From: Thomas Waehner <[email protected]>
The 'N' typ flashes have bigger sectors, than the formerly used 'M' types, so the flash layout has to be changed -> new start address of the environment.
---
include/configs/TQM85xx.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
include/configs/TQM85xx.h +3 -3
@@ -149,7 +149,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 )
@@ -346,8 +346,8 @@* 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 */ +#define CFG_ENV_ADDR (CFG_MONITOR_BASE - 0x40000) +#define CFG_ENV_SECT_SIZE 0x40000/* 256K(one sector (N)) for env */ #define CFG_ENV_SIZE 0x2000#define CFG_ENV_ADDR_REDUND (CFG_ENV_ADDR-CFG_ENV_SECT_SIZE)#define CFG_ENV_SIZE_REDUND (CFG_ENV_SIZE)
PATCH 1/1 TQM85xx: add support for Spansion 'N' type flashes.
Hi Martin,
Quoted 24 lines · Martin Krause
The 'N' typ flashes have bigger sectors, than the formerly used 'M' types, so the flash layout has to be changed -> new start address of the environment.
Signed-off-by Martin Krause <[email protected]>---
include/configs/TQM85xx.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)include/configs/TQM85xx.h +1
-1@@ -149,7 +149,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 )
include/configs/TQM85xx.h line 350
Quoted 7 lines
include/configs/TQM85xx.h +2
-2@@ -346,8 +346,8 @@* 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 */ +#define CFG_ENV_ADDR (CFG_MONITOR_BASE - 0x40000) +#define CFG_ENV_SECT_SIZE 0x40000/* 256K(one sector (N)) for env */
How about this:
#define CFG_ENV_SECT_SIZE 0x40000 /* 256K(one sector (N)) for env */
#define CFG_ENV_ADDR (CFG_MONITOR_BASE - CFG_ENV_SECT_SIZE)
This way you only need to hardcode the sector size once.
Viele Gr??e,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
PATCH 1/1 TQM85xx: add support for Spansion 'N' type flashes.
Hi Stefan,
Stefan Roese wrote on Friday, June 22, 2007 1:29 PM:
Quoted 3 lines · Martin Krause
Review
Quoted 2 lines
(quoted diff) +0
-2-#define CFG_ENV_ADDR (CFG_MONITOR_BASE - 0x20000) -#define CFG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env
*/
Quoted 7 lines
Quoted 3 lines
(quoted diff) +2
-0+#define CFG_ENV_ADDR (CFG_MONITOR_BASE - 0x40000) +#define CFG_ENV_SECT_SIZE 0x40000 /* 256K(one sector (N)) forenv */
How about this:
#define
CFG_ENV_SECT_SIZE0x40000/* 256K(one sector (N)) for env
*/
Quoted 3 lines
#define
CFG_ENV_ADDR(CFG_MONITOR_BASE-CFG_ENV_SECT_SIZE)This way you only need to hardcode the sector size once.
Good idea. I will cleanup the patch and resubmit.
Regards,
Martin Krause
Entwicklung
Tel. +49 8153 93 08-157, Fax +49 8153 93 08-7157
mailto:martin.krause at tqs.de
TQ-Systems GmbH
Muehlstra?e 2, Gut Delling, D-82229 Seefeld
Amtsgericht Muenchen, HRB 105 018, UST-IdNr. DE 811 607 913
Geschaeftsfuehrer: Dipl.-Ing. (FH) Detlef Schneider, Dipl.-Ing. (FH) Ruediger Stahl
http://www.tq-group.com