* [U-Boot] [PATCH] TQM85xx: adapt for new flash types
@ 2009-05-14 22:16 Wolfgang Denk
2009-05-14 22:16 ` [U-Boot] [PATCH] TQM85xx: minor config file cleanup Wolfgang Denk
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Wolfgang Denk @ 2009-05-14 22:16 UTC (permalink / raw)
To: u-boot
Old TQM85xx boards had '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.
We now change the configuration to the new flash types for all
boards; this also works on old boards - we just waste two flash
sectors for the environment which could be smaller there.
Signed-off-by: Wolfgang Denk <wd@denx.de>
---
include/configs/TQM85xx.h | 13 -------------
1 files changed, 0 insertions(+), 13 deletions(-)
diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h
index 2ef24cd..26b12f9 100644
--- a/include/configs/TQM85xx.h
+++ b/include/configs/TQM85xx.h
@@ -166,15 +166,6 @@
#endif /* CONFIG_TQM8541 || CONFIG_TQM8555 || CONFIG_TQM8548 */
/*
- * 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.
- */
-#ifdef CONFIG_TQM8548
-#define CONFIG_TQM_FLASH_N_TYPE
-#endif /* CONFIG_TQM8548 */
-
-/*
* Flash on the Local Bus
*/
#ifdef CONFIG_TQM_BIGFLASH
@@ -547,11 +538,7 @@
*/
#define CONFIG_ENV_IS_IN_FLASH 1
-#ifdef CONFIG_TQM_FLASH_N_TYPE
#define CONFIG_ENV_SECT_SIZE 0x40000 /* 256K (one sector) for env */
-#else /* !CONFIG_TQM_FLASH_N_TYPE */
-#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) for env */
-#endif /* CONFIG_TQM_FLASH_N_TYPE */
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
#define CONFIG_ENV_SIZE 0x2000
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR - CONFIG_ENV_SECT_SIZE)
--
1.6.0.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] TQM85xx: minor config file cleanup
2009-05-14 22:16 [U-Boot] [PATCH] TQM85xx: adapt for new flash types Wolfgang Denk
@ 2009-05-14 22:16 ` Wolfgang Denk
2009-06-09 21:06 ` Wolfgang Denk
2009-05-14 22:16 ` [U-Boot] [PATCH] Redundant Environment: protect full sector size Wolfgang Denk
2009-06-09 21:05 ` [U-Boot] [PATCH] TQM85xx: adapt for new flash types Wolfgang Denk
2 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2009-05-14 22:16 UTC (permalink / raw)
To: u-boot
Remove "saveenv" from "update" definition: the environment is outside
the U-Boot image on TQM85xx and therefor not affected by updates.
Also "beautify" code a bit (vertical alignment).
Signed-off-by: Wolfgang Denk <wd@denx.de>
---
include/configs/TQM85xx.h | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h
index 26b12f9..0846501 100644
--- a/include/configs/TQM85xx.h
+++ b/include/configs/TQM85xx.h
@@ -667,7 +667,7 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_ENV_BOOTFILE \
CONFIG_ENV_FDT_FILE \
- CONFIG_ENV_CONSDEV \
+ CONFIG_ENV_CONSDEV \
"netdev=eth0\0" \
"nfsargs=setenv bootargs root=/dev/nfs rw " \
"nfsroot=$serverip:$rootpath\0" \
@@ -691,12 +691,11 @@
"fdt_addr=ffec0000\0" \
"kernel_addr=ffd00000\0" \
"ramdisk_addr=ff800000\0" \
- CONFIG_ENV_UBOOT \
+ CONFIG_ENV_UBOOT \
"load=tftp 100000 $uboot\0" \
"update=protect off $uboot_addr +$filesize;" \
"erase $uboot_addr +$filesize;" \
- "cp.b 100000 $uboot_addr $filesize;" \
- "setenv filesize;saveenv\0" \
+ "cp.b 100000 $uboot_addr $filesize" \
"upd=run load update\0" \
""
#define CONFIG_BOOTCOMMAND "run flash_self"
--
1.6.0.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] Redundant Environment: protect full sector size
2009-05-14 22:16 [U-Boot] [PATCH] TQM85xx: adapt for new flash types Wolfgang Denk
2009-05-14 22:16 ` [U-Boot] [PATCH] TQM85xx: minor config file cleanup Wolfgang Denk
@ 2009-05-14 22:16 ` Wolfgang Denk
2009-05-15 7:28 ` Stefan Roese
2009-06-03 22:16 ` Wolfgang Denk
2009-06-09 21:05 ` [U-Boot] [PATCH] TQM85xx: adapt for new flash types Wolfgang Denk
2 siblings, 2 replies; 7+ messages in thread
From: Wolfgang Denk @ 2009-05-14 22:16 UTC (permalink / raw)
To: u-boot
Several boards used different ways to specify the size of the
protected area when enabling flash write protection for the sectors
holding the environment variables: some used CONFIG_ENV_SIZE and
CONFIG_ENV_SIZE_REDUND, some used CONFIG_ENV_SECT_SIZE, and some even
a mix of both for the "normal" and the "redundant" areas.
Normally, this makes no difference at all. However, things are
different when you have to deal with boards that can come with
different types of flash chips, which may have different sector
sizes.
Here we may have to chose CONFIG_ENV_SECT_SIZE such that it fits the
biggest sector size, which may include several sectors on boards using
the smaller sector flash types. In such a case, using CONFIG_ENV_SIZE
or CONFIG_ENV_SIZE_REDUND to enable the protection may lead to the
case that only the first of these sectors get protected, while the
following ones aren't.
This is no real problem, but it can be confusing for the user -
especially on boards that use CONFIG_ENV_SECT_SIZE to protect the
"normal" areas, while using CONFIG_ENV_SIZE_REDUND for the
"redundant" area.
To avoid such inconsistencies, I changed all sucn boards that I found
to consistently use CONFIG_ENV_SECT_SIZE for protection. This should
not cause any functional changes to the code.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Paul Ruhland
Cc: Pantelis Antoniou <panto@intracom.gr>
Cc: Stefan Roese <sr@denx.de>
Cc: Gary Jennejohn <garyj@denx.de>
Cc: Dave Ellis <DGE@sixnetio.com>
---
board/lpd7a40x/flash.c | 4 ++--
board/mcc200/mcc200.c | 2 +-
board/netphone/flash.c | 4 ++--
board/netta/flash.c | 4 ++--
board/netta2/flash.c | 4 ++--
board/netvia/flash.c | 4 ++--
board/pleb2/flash.c | 4 ++--
board/prodrive/pdnb3/flash.c | 2 +-
board/rmu/flash.c | 6 +++---
board/samsung/smdk2400/flash.c | 4 ++--
board/sixnet/flash.c | 4 ++--
board/socrates/socrates.c | 2 +-
board/tqc/tqm85xx/tqm85xx.c | 2 +-
board/trab/flash.c | 4 ++--
drivers/mtd/cfi_flash.c | 2 +-
15 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/board/lpd7a40x/flash.c b/board/lpd7a40x/flash.c
index e3558d2..e85ec38 100644
--- a/board/lpd7a40x/flash.c
+++ b/board/lpd7a40x/flash.c
@@ -98,12 +98,12 @@ ulong flash_init (void)
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR,
- CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]);
+ CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]);
#ifdef CONFIG_ENV_ADDR_REDUND
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[0]);
#endif
diff --git a/board/mcc200/mcc200.c b/board/mcc200/mcc200.c
index 14cf08d..9fa1d3a 100644
--- a/board/mcc200/mcc200.c
+++ b/board/mcc200/mcc200.c
@@ -270,7 +270,7 @@ int misc_init_r (void)
/* Redundant environment protection ON by default */
flash_protect (FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]);
}
diff --git a/board/netphone/flash.c b/board/netphone/flash.c
index 8852127..349d98e 100644
--- a/board/netphone/flash.c
+++ b/board/netphone/flash.c
@@ -73,13 +73,13 @@ unsigned long flash_init(void)
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR,
- CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1,
+ CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[0]);
#ifdef CONFIG_ENV_ADDR_REDUND
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[0]);
#endif
diff --git a/board/netta/flash.c b/board/netta/flash.c
index 45e6b30..565fd67 100644
--- a/board/netta/flash.c
+++ b/board/netta/flash.c
@@ -69,13 +69,13 @@ unsigned long flash_init(void)
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR,
- CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1,
+ CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[0]);
#ifdef CONFIG_ENV_ADDR_REDUND
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[0]);
#endif
diff --git a/board/netta2/flash.c b/board/netta2/flash.c
index b63f459..53a4e1e 100644
--- a/board/netta2/flash.c
+++ b/board/netta2/flash.c
@@ -70,13 +70,13 @@ unsigned long flash_init(void)
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR,
- CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1,
+ CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[0]);
#ifdef CONFIG_ENV_ADDR_REDUND
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[0]);
#endif
diff --git a/board/netvia/flash.c b/board/netvia/flash.c
index 98479a5..b987434 100644
--- a/board/netvia/flash.c
+++ b/board/netvia/flash.c
@@ -69,13 +69,13 @@ unsigned long flash_init(void)
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR,
- CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1,
+ CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[0]);
#ifdef CONFIG_ENV_ADDR_REDUND
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[0]);
#endif
diff --git a/board/pleb2/flash.c b/board/pleb2/flash.c
index abaf0b4..a8897dc 100644
--- a/board/pleb2/flash.c
+++ b/board/pleb2/flash.c
@@ -110,13 +110,13 @@ unsigned long flash_init (void)
#ifdef CONFIG_ENV_ADDR
flash_protect (FLAG_PROTECT_SET,
CONFIG_ENV_ADDR,
- CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]);
+ CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]);
#endif
#ifdef CONFIG_ENV_ADDR_REDUND
flash_protect (FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[0]);
#endif
diff --git a/board/prodrive/pdnb3/flash.c b/board/prodrive/pdnb3/flash.c
index 351aed1..fe8d100 100644
--- a/board/prodrive/pdnb3/flash.c
+++ b/board/prodrive/pdnb3/flash.c
@@ -78,7 +78,7 @@ unsigned long flash_init(void)
/* Redundant environment protection ON by default */
flash_protect(FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]);
flash_info[0].size = size;
diff --git a/board/rmu/flash.c b/board/rmu/flash.c
index a3ab851..283b19d 100644
--- a/board/rmu/flash.c
+++ b/board/rmu/flash.c
@@ -85,18 +85,18 @@ unsigned long flash_init (void)
/* ENV protection ON by default */
flash_protect(FLAG_PROTECT_SET,
CONFIG_ENV_ADDR,
- CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1,
+ CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1,
&flash_info[0]);
#endif
#if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND)
debug ("Protect redundand environment: %08lx ... %08lx\n",
(ulong)CONFIG_ENV_ADDR_REDUND,
- (ulong)CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE - 1);
+ (ulong)CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1);
flash_protect(FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[0]);
#endif
diff --git a/board/samsung/smdk2400/flash.c b/board/samsung/smdk2400/flash.c
index 9eee60d..8a140cf 100644
--- a/board/samsung/smdk2400/flash.c
+++ b/board/samsung/smdk2400/flash.c
@@ -98,12 +98,12 @@ ulong flash_init (void)
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR,
- CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]);
+ CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]);
#ifdef CONFIG_ENV_ADDR_REDUND
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[0]);
#endif
diff --git a/board/sixnet/flash.c b/board/sixnet/flash.c
index a8dfca8..2090802 100644
--- a/board/sixnet/flash.c
+++ b/board/sixnet/flash.c
@@ -111,13 +111,13 @@ unsigned long flash_init (void)
#ifdef CONFIG_ENV_ADDR
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR,
- CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]);
+ CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]);
#endif
#ifdef CONFIG_ENV_ADDR_REDUND
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[0]);
#endif
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
index df9696e..51d66d5 100644
--- a/board/socrates/socrates.c
+++ b/board/socrates/socrates.c
@@ -136,7 +136,7 @@ int misc_init_r (void)
/* Redundant environment protection ON by default */
flash_protect (FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]);
}
diff --git a/board/tqc/tqm85xx/tqm85xx.c b/board/tqc/tqm85xx/tqm85xx.c
index a70fd26..ab0e0dd 100644
--- a/board/tqc/tqm85xx/tqm85xx.c
+++ b/board/tqc/tqm85xx/tqm85xx.c
@@ -328,7 +328,7 @@ int misc_init_r (void)
/* Redundant environment protection ON by default */
flash_protect (FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]);
#endif
diff --git a/board/trab/flash.c b/board/trab/flash.c
index 317b61d..568e739 100644
--- a/board/trab/flash.c
+++ b/board/trab/flash.c
@@ -108,12 +108,12 @@ ulong flash_init (void)
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR,
- CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]);
+ CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]);
#ifdef CONFIG_ENV_ADDR_REDUND
flash_protect ( FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
&flash_info[0]);
#endif
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 175d82a..d0732f5 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -2098,7 +2098,7 @@ unsigned long flash_init (void)
#ifdef CONFIG_ENV_ADDR_REDUND
flash_protect (FLAG_PROTECT_SET,
CONFIG_ENV_ADDR_REDUND,
- CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
flash_get_info(CONFIG_ENV_ADDR_REDUND));
#endif
--
1.6.0.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] Redundant Environment: protect full sector size
2009-05-14 22:16 ` [U-Boot] [PATCH] Redundant Environment: protect full sector size Wolfgang Denk
@ 2009-05-15 7:28 ` Stefan Roese
2009-06-03 22:16 ` Wolfgang Denk
1 sibling, 0 replies; 7+ messages in thread
From: Stefan Roese @ 2009-05-15 7:28 UTC (permalink / raw)
To: u-boot
On Friday 15 May 2009 00:16:03 Wolfgang Denk wrote:
> Several boards used different ways to specify the size of the
> protected area when enabling flash write protection for the sectors
> holding the environment variables: some used CONFIG_ENV_SIZE and
> CONFIG_ENV_SIZE_REDUND, some used CONFIG_ENV_SECT_SIZE, and some even
> a mix of both for the "normal" and the "redundant" areas.
>
> Normally, this makes no difference at all. However, things are
> different when you have to deal with boards that can come with
> different types of flash chips, which may have different sector
> sizes.
>
> Here we may have to chose CONFIG_ENV_SECT_SIZE such that it fits the
> biggest sector size, which may include several sectors on boards using
> the smaller sector flash types. In such a case, using CONFIG_ENV_SIZE
> or CONFIG_ENV_SIZE_REDUND to enable the protection may lead to the
> case that only the first of these sectors get protected, while the
> following ones aren't.
>
> This is no real problem, but it can be confusing for the user -
> especially on boards that use CONFIG_ENV_SECT_SIZE to protect the
> "normal" areas, while using CONFIG_ENV_SIZE_REDUND for the
> "redundant" area.
>
> To avoid such inconsistencies, I changed all sucn boards that I found
> to consistently use CONFIG_ENV_SECT_SIZE for protection. This should
> not cause any functional changes to the code.
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Paul Ruhland
> Cc: Pantelis Antoniou <panto@intracom.gr>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Gary Jennejohn <garyj@denx.de>
> Cc: Dave Ellis <DGE@sixnetio.com>
Acked-by: Stefan Roese <sr@denx.de>
Thanks.
Best regards,
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] 7+ messages in thread
* [U-Boot] [PATCH] Redundant Environment: protect full sector size
2009-05-14 22:16 ` [U-Boot] [PATCH] Redundant Environment: protect full sector size Wolfgang Denk
2009-05-15 7:28 ` Stefan Roese
@ 2009-06-03 22:16 ` Wolfgang Denk
1 sibling, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2009-06-03 22:16 UTC (permalink / raw)
To: u-boot
Hello,
In message <1242339363-28686-3-git-send-email-wd@denx.de> you wrote:
> Several boards used different ways to specify the size of the
> protected area when enabling flash write protection for the sectors
> holding the environment variables: some used CONFIG_ENV_SIZE and
> CONFIG_ENV_SIZE_REDUND, some used CONFIG_ENV_SECT_SIZE, and some even
> a mix of both for the "normal" and the "redundant" areas.
>
> Normally, this makes no difference at all. However, things are
> different when you have to deal with boards that can come with
> different types of flash chips, which may have different sector
> sizes.
>
> Here we may have to chose CONFIG_ENV_SECT_SIZE such that it fits the
> biggest sector size, which may include several sectors on boards using
> the smaller sector flash types. In such a case, using CONFIG_ENV_SIZE
> or CONFIG_ENV_SIZE_REDUND to enable the protection may lead to the
> case that only the first of these sectors get protected, while the
> following ones aren't.
>
> This is no real problem, but it can be confusing for the user -
> especially on boards that use CONFIG_ENV_SECT_SIZE to protect the
> "normal" areas, while using CONFIG_ENV_SIZE_REDUND for the
> "redundant" area.
>
> To avoid such inconsistencies, I changed all sucn boards that I found
> to consistently use CONFIG_ENV_SECT_SIZE for protection. This should
> not cause any functional changes to the code.
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Paul Ruhland
> Cc: Pantelis Antoniou <panto@intracom.gr>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Gary Jennejohn <garyj@denx.de>
> Cc: Dave Ellis <DGE@sixnetio.com>
> ---
> board/lpd7a40x/flash.c | 4 ++--
> board/mcc200/mcc200.c | 2 +-
> board/netphone/flash.c | 4 ++--
> board/netta/flash.c | 4 ++--
> board/netta2/flash.c | 4 ++--
> board/netvia/flash.c | 4 ++--
> board/pleb2/flash.c | 4 ++--
> board/prodrive/pdnb3/flash.c | 2 +-
> board/rmu/flash.c | 6 +++---
> board/samsung/smdk2400/flash.c | 4 ++--
> board/sixnet/flash.c | 4 ++--
> board/socrates/socrates.c | 2 +-
> board/tqc/tqm85xx/tqm85xx.c | 2 +-
> board/trab/flash.c | 4 ++--
> drivers/mtd/cfi_flash.c | 2 +-
> 15 files changed, 26 insertions(+), 26 deletions(-)
Applied to master.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"If that makes any sense to you, you have a big problem."
-- C. Durance, Computer Science 234
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] TQM85xx: adapt for new flash types
2009-05-14 22:16 [U-Boot] [PATCH] TQM85xx: adapt for new flash types Wolfgang Denk
2009-05-14 22:16 ` [U-Boot] [PATCH] TQM85xx: minor config file cleanup Wolfgang Denk
2009-05-14 22:16 ` [U-Boot] [PATCH] Redundant Environment: protect full sector size Wolfgang Denk
@ 2009-06-09 21:05 ` Wolfgang Denk
2 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2009-06-09 21:05 UTC (permalink / raw)
To: u-boot
Dear Andy,
In message <1242339363-28686-1-git-send-email-wd@denx.de> you wrote:
> Old TQM85xx boards had '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.
>
> We now change the configuration to the new flash types for all
> boards; this also works on old boards - we just waste two flash
> sectors for the environment which could be smaller there.
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
> include/configs/TQM85xx.h | 13 -------------
> 1 files changed, 0 insertions(+), 13 deletions(-)
Applied directly, hope this is OK with you.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I think that all right-thinking people in this country are sick and
tired of being told that ordinary decent people are fed up in this
country with being sick and tired. I'm certainly not. But I'm sick
and tired of being told that I am. - Monty Python
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] TQM85xx: minor config file cleanup
2009-05-14 22:16 ` [U-Boot] [PATCH] TQM85xx: minor config file cleanup Wolfgang Denk
@ 2009-06-09 21:06 ` Wolfgang Denk
0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2009-06-09 21:06 UTC (permalink / raw)
To: u-boot
Dear Andy,
In message <1242339363-28686-2-git-send-email-wd@denx.de> you wrote:
> Remove "saveenv" from "update" definition: the environment is outside
> the U-Boot image on TQM85xx and therefor not affected by updates.
>
> Also "beautify" code a bit (vertical alignment).
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
> include/configs/TQM85xx.h | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
Applied directly, hope this is OK with you.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Boss, n.: According to the Oxford English Dictionary, in the Middle
Ages the words "boss" and "botch" were largely synonymous, except
that boss, in addition to meaning "a supervisor of workers" also
meant "an ornamental stud."
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-06-09 21:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-14 22:16 [U-Boot] [PATCH] TQM85xx: adapt for new flash types Wolfgang Denk
2009-05-14 22:16 ` [U-Boot] [PATCH] TQM85xx: minor config file cleanup Wolfgang Denk
2009-06-09 21:06 ` Wolfgang Denk
2009-05-14 22:16 ` [U-Boot] [PATCH] Redundant Environment: protect full sector size Wolfgang Denk
2009-05-15 7:28 ` Stefan Roese
2009-06-03 22:16 ` Wolfgang Denk
2009-06-09 21:05 ` [U-Boot] [PATCH] TQM85xx: adapt for new flash types Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox