* [U-Boot] [PATCH] TQM8260: environment in flash instead EEPROM, baudrate 115k
@ 2008-10-19 19:54 Wolfgang Denk
2008-10-21 9:28 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2008-10-19 19:54 UTC (permalink / raw)
To: u-boot
From: Wolfgang Denk <wd@xpert.denx.de>
Several customers have reported problems with the environment in
EEPROM, including corrupted content after board reset. Probably the
code to prevent I2C Enge Conditions is not working sufficiently.
We move the environment to flash now, which allows to have a backup
copy plus gives much faster boot times.
Also, change the default console initialization to 115200 bps as used
on most other boards.
Signed-off-by: Wolfgang Denk <wd@denx.de>
---
board/tqc/tqm8260/flash.c | 13 +++++++++++--
include/configs/TQM8260.h | 30 ++++++++++--------------------
2 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/board/tqc/tqm8260/flash.c b/board/tqc/tqm8260/flash.c
index 4a6d538..cabc818 100644
--- a/board/tqc/tqm8260/flash.c
+++ b/board/tqc/tqm8260/flash.c
@@ -204,7 +204,8 @@ unsigned long flash_init (void)
#if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH0_BASE
flash_protect (FLAG_PROTECT_SET,
CONFIG_SYS_MONITOR_BASE,
- CONFIG_SYS_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]);
+ CONFIG_SYS_MONITOR_BASE + monitor_flash_len - 1,
+ &flash_info[0]);
#endif
#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR)
@@ -213,7 +214,15 @@ unsigned long flash_init (void)
# endif
flash_protect (FLAG_PROTECT_SET,
CONFIG_ENV_ADDR,
- CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]);
+ CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1,
+ &flash_info[0]);
+#endif
+
+#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR_REDUND)
+ flash_protect (FLAG_PROTECT_SET,
+ CONFIG_ENV_ADDR_REDUND,
+ CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1,
+ &flash_info[0]);
#endif
return (size_b0);
diff --git a/include/configs/TQM8260.h b/include/configs/TQM8260.h
index 54f4b31..533c7ad 100644
--- a/include/configs/TQM8260.h
+++ b/include/configs/TQM8260.h
@@ -60,11 +60,7 @@
#define CONFIG_BOOTCOUNT_LIMIT
-#if defined(CONFIG_CONS_NONE) || defined(CONFIG_CONS_USE_EXTC)
-#define CONFIG_BAUDRATE 230400
-#else
-#define CONFIG_BAUDRATE 9600
-#endif
+#define CONFIG_BAUDRATE 115200
#define CONFIG_PREBOOT "echo;echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;echo"
@@ -83,10 +79,10 @@
"flash_self=run ramargs addip;" \
"bootm ${kernel_addr} ${ramdisk_addr}\0" \
"net_nfs=tftp 200000 ${bootfile};run nfsargs addip;bootm\0" \
- "rootpath=/opt/eldk/ppc_82xx\0" \
- "bootfile=/tftpboot/TQM8260/uImage\0" \
- "kernel_addr=40040000\0" \
- "ramdisk_addr=40100000\0" \
+ "rootpath=/opt/eldk/ppc_6xx\0" \
+ "bootfile=tqm8260/uImage\0" \
+ "kernel_addr=40080000\0" \
+ "ramdisk_addr=40200000\0" \
""
#define CONFIG_BOOTCOMMAND "run flash_self"
@@ -304,18 +300,12 @@
#define CONFIG_SYS_FLASH_ERASE_TOUT 240000 /* Flash Erase Timeout (in ms) */
#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (in ms) */
-#if 0
-/* Start port with environment in flash; switch to EEPROM later */
#define CONFIG_ENV_IS_IN_FLASH 1
-#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE+0x40000)
-#define CONFIG_ENV_SIZE 0x40000
+#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x40000)
+#define CONFIG_ENV_SIZE 0x08000
#define CONFIG_ENV_SECT_SIZE 0x40000
-#else
-/* Final version: environment in EEPROM */
-#define CONFIG_ENV_IS_IN_EEPROM 1
-#define CONFIG_ENV_OFFSET 0
-#define CONFIG_ENV_SIZE 2048
-#endif
+#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
/*-----------------------------------------------------------------------
* Hardware Information Block
@@ -380,7 +370,7 @@
#define CONFIG_SYS_FLASH_BASE CONFIG_SYS_FLASH0_BASE
#define CONFIG_SYS_MONITOR_BASE TEXT_BASE
#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
-#define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc()*/
+#define CONFIG_SYS_MALLOC_LEN (512 << 10) /* Reserve 512 kB for malloc()*/
/*
* Internal Definitions
--
1.5.4.rc1.23.g3a969
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] TQM8260: environment in flash instead EEPROM, baudrate 115k
@ 2008-10-20 6:06 Heiko Schocher
2008-10-20 7:03 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Heiko Schocher @ 2008-10-20 6:06 UTC (permalink / raw)
To: u-boot
Hello Wolfgang,
Wolfgang Denk wrote:
> Several customers have reported problems with the environment in
> EEPROM, including corrupted content after board reset. Probably the
> code to prevent I2C Enge Conditions is not working sufficiently.
Is this somewhere reproducible?
Maybe we can try my patch from:
http://lists.denx.de/pipermail/u-boot/2008-October/041817.html
also for this board. The I2C deblocking is in i2c_make_abort () ...
If this works better, maybe we use this I2C deblocking mechanism as
new standard?
> We move the environment to flash now, which allows to have a backup
> copy plus gives much faster boot times.
[...]
> --- a/board/tqc/tqm8260/flash.c
> +++ b/board/tqc/tqm8260/flash.c
Couldnt use this board also the CFI driver?
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] TQM8260: environment in flash instead EEPROM, baudrate 115k
2008-10-20 6:06 [U-Boot] [PATCH] TQM8260: environment in flash instead EEPROM, baudrate 115k Heiko Schocher
@ 2008-10-20 7:03 ` Wolfgang Denk
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2008-10-20 7:03 UTC (permalink / raw)
To: u-boot
Dear Heiko Schocher,
In message <48FC1FFC.2000104@denx.de> you wrote:
>
> Is this somewhere reproducible?
Kind of. It happens pretty r4eliably on weak power supplies (too high
impadance, too slow voltage rise times) where the TQM8260 whould go
through a series of quick startup - reset sequences when powered on.
On such systems, a power-on often consisted of 3...5 start attempts
that were cut off by the voltage monitor on the module. This often
lead to EEPROM content corruption.
Actually this configuration was the reason the I2C edge condition
work around was implemented, a long, long time ago. But then,, it
seems it doesn;t work absolutely reliable in all situations.
> Maybe we can try my patch from:
>
> http://lists.denx.de/pipermail/u-boot/2008-October/041817.html
I thought about this, too, but unfortunately no such test system is
available to me (nor to the customer any more; he fixed the obvious
problem with the PSU; yet he still sees occasional corruptions).
Aslo boot time was a strong reason to switch to a flash based
environment (and to a higher console baudrate).
> also for this board. The I2C deblocking is in i2c_make_abort () ...
> If this works better, maybe we use this I2C deblocking mechanism as
> new standard?
I'm afraid I have no way to test this...
> > --- a/board/tqc/tqm8260/flash.c
> > +++ b/board/tqc/tqm8260/flash.c
>
> Couldnt use this board also the CFI driver?
Yes, it could, if the CFI driver was working on this board. It is my
intention to change this as soon as the CFI driver is working (see my
other thread: "CFI Driver Problem: flash not ready").
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
Nail here --X-- for new monitor.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] TQM8260: environment in flash instead EEPROM, baudrate 115k
2008-10-19 19:54 Wolfgang Denk
@ 2008-10-21 9:28 ` Wolfgang Denk
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2008-10-21 9:28 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1224446070-27795-1-git-send-email-wd@denx.de> you wrote:
> From: Wolfgang Denk <wd@xpert.denx.de>
>
> Several customers have reported problems with the environment in
> EEPROM, including corrupted content after board reset. Probably the
> code to prevent I2C Enge Conditions is not working sufficiently.
>
> We move the environment to flash now, which allows to have a backup
> copy plus gives much faster boot times.
>
> Also, change the default console initialization to 115200 bps as used
> on most other boards.
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> ---
> board/tqc/tqm8260/flash.c | 13 +++++++++++--
> include/configs/TQM8260.h | 30 ++++++++++--------------------
> 2 files changed, 21 insertions(+), 22 deletions(-)
Applied.
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
The existence of god implies a violation of causality.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-21 9:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-20 6:06 [U-Boot] [PATCH] TQM8260: environment in flash instead EEPROM, baudrate 115k Heiko Schocher
2008-10-20 7:03 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2008-10-19 19:54 Wolfgang Denk
2008-10-21 9:28 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.