From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Fri, 22 Jun 2007 13:29:04 +0200 Subject: [U-Boot-Users] [PATCH] TQM85xx: add support for Spansion 'N' type flashes. In-Reply-To: <20070622110008.24421.25624.stgit@tq-sewsrv-4.tq-net.de> References: <20070622110008.24421.25624.stgit@tq-sewsrv-4.tq-net.de> Message-ID: <200706221329.05104.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Martin, On Friday 22 June 2007, Martin Krause wrote: > 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 > --- > > include/configs/TQM85xx.h | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h > index f45f3a2..6c74add 100644 > --- a/include/configs/TQM85xx.h > +++ b/include/configs/TQM85xx.h > @@ -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 */ 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 =====================================================================