* [U-Boot-Users] [PATCH] TQM85xx: add support for Spansion 'N' type flashes.
@ 2007-06-22 11:00 Martin Krause
2007-06-22 11:29 ` Stefan Roese
0 siblings, 1 reply; 6+ messages in thread
From: Martin Krause @ 2007-06-22 11:00 UTC (permalink / raw)
To: u-boot
From: Thomas Waehner <thomas.waehner@tqs.de>
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 <martin.krause@tqs.de>
---
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 */
#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)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot-Users] [PATCH] TQM85xx: add support for Spansion 'N' type flashes.
2007-06-22 11:00 [U-Boot-Users] [PATCH] TQM85xx: add support for Spansion 'N' type flashes Martin Krause
@ 2007-06-22 11:29 ` Stefan Roese
2007-06-22 12:48 ` Martin Krause
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Roese @ 2007-06-22 11:29 UTC (permalink / raw)
To: u-boot
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 <martin.krause@tqs.de>
> ---
>
> 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
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] [PATCH] TQM85xx: add support for Spansion 'N' type flashes.
2007-06-22 11:29 ` Stefan Roese
@ 2007-06-22 12:48 ` Martin Krause
0 siblings, 0 replies; 6+ messages in thread
From: Martin Krause @ 2007-06-22 12:48 UTC (permalink / raw)
To: u-boot
Hi Stefan,
Stefan Roese wrote on Friday, June 22, 2007 1:29 PM:
> On Friday 22 June 2007, Martin Krause wrote:
> > -#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.
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] [PATCH] TQM85xx: add support for Spansion 'N' type flashes.
@ 2007-06-22 13:00 Martin Krause
2007-06-23 19:08 ` Andy Fleming
0 siblings, 1 reply; 6+ messages in thread
From: Martin Krause @ 2007-06-22 13:00 UTC (permalink / raw)
To: u-boot
From: Thomas Waehner <thomas.waehner@tqs.de>
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 <martin.krause@tqs.de>
---
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..35bfb00 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_SECT_SIZE 0x40000 /* 256K(one sector (N)) for env */
+#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_SIZE_REDUND (CFG_ENV_SIZE)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot-Users] [PATCH] TQM85xx: add support for Spansion 'N' type flashes.
2007-06-22 13:00 Martin Krause
@ 2007-06-23 19:08 ` Andy Fleming
2007-06-25 15:08 ` Martin Krause
0 siblings, 1 reply; 6+ messages in thread
From: Andy Fleming @ 2007-06-23 19:08 UTC (permalink / raw)
To: u-boot
On 6/22/07, Martin Krause <martin.krause@tqs.de> wrote:
> From: Thomas Waehner <thomas.waehner@tqs.de>
>
> ---
>
> 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..35bfb00 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 */
I'm not familiar with this board, so I'm not familiar with what type
of flash it has. Does the current config file not work? Does this
new config file switch the TQM85xx to using the 'N' type at the
expense of older boards which use the 'M' type? If so, my preference
would be to preserve the old config options for the old board, and
have new options for the new board. There are a number of ways you
could do that without creating a new board config file.
Or does no one have a board with the 'M' type flash?
Andy
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] [PATCH] TQM85xx: add support for Spansion 'N' type flashes.
2007-06-23 19:08 ` Andy Fleming
@ 2007-06-25 15:08 ` Martin Krause
0 siblings, 0 replies; 6+ messages in thread
From: Martin Krause @ 2007-06-25 15:08 UTC (permalink / raw)
To: u-boot
Andy Fleming wrote on Saturday, June 23, 2007 9:08 PM:
> On 6/22/07, Martin Krause <martin.krause@tqs.de> wrote:
> > From: Thomas Waehner <thomas.waehner@tqs.de>
> >
> > ---
> >
> > 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..35bfb00 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 */
>
>
> I'm not familiar with this board, so I'm not familiar with what type
> of flash it has. Does the current config file not work? Does this
It does work. But only with boards equipped with 'M' type flashes,
not with 'N' types.
OK, I should explain what I mean with 'M' and 'N' types. On the
TQM85xx boards we use Spansion flashes from the S29GLxxx series.
We started with the S29GLxxxM series (-> 'M' type). Spansion
discontinued this series (or plans to do so soon), so we switched
to the successor S29GLxxxN (-> 'N' type).
Unfortunately the 'N' type has doubled sector sizes compared to
the 'M' types. Because of this, the flash map has to be adjusted
a little bit -> the address of the environment has changed
(and more malloc space is required to handle the bigger sectors).
> new config file switch the TQM85xx to using the 'N' type at the
> expense of older boards which use the 'M' type? If so, my preference
The new configuration runs on boards with 'N' _and_ 'M' type
flashes. However, it is not 100% compatible, because of the
changed address of the u-boot environment in flash.
> would be to preserve the old config options for the old board, and
> have new options for the new board. There are a number of ways you
> could do that without creating a new board config file.
Hm, I could create a new CONFIG_TQM_N_TYPE option and add some new
make targets (TQM8540_n-type_config, TQM8541_n-type_config, ...).
But I'm not sure, if Wolfang Denk will like this ...
> Or does no one have a board with the 'M' type flash?
There are boards with both types of flashes floating around.
All new boards have 'N' type flashes.
Regards,
Martin Krause
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-06-25 15:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-22 11:00 [U-Boot-Users] [PATCH] TQM85xx: add support for Spansion 'N' type flashes Martin Krause
2007-06-22 11:29 ` Stefan Roese
2007-06-22 12:48 ` Martin Krause
-- strict thread matches above, loose matches on Subject: below --
2007-06-22 13:00 Martin Krause
2007-06-23 19:08 ` Andy Fleming
2007-06-25 15:08 ` Martin Krause
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox