Re: [U-Boot-Users] [PATCH RFC] ARM: Davinci: NAND fix for large page ECC and linux compatibility

2008-06-27 Thread Jean-Christophe PLAGNIOL-VILLARD
  #endif
 +#endif
  
  static void nand_davinci_enable_hwecc(struct mtd_info *mtd, int mode)
  {
 @@ -141,12 +146,29 @@ static u_int32_t nand_davinci_readecc(st
  
  static int nand_davinci_calculate_ecc(struct mtd_info *mtd, const u_char 
 *dat, u_char *ecc_code)
  {
 +#ifdef CFG_LINUX_COMPATIBLE_ECC
 + unsigned int ecc_val = nand_davinci_readecc(mtd, 1);
 + /* squeeze 0 middle bits out so that it fits in 3 bytes */
 + unsigned int tmp = (ecc_val0x0fff)|((ecc_val0x0fff)4);
unsigned int tmp = (ecc_val  0x0fff) | ((ecc_val  0x0fff)  4);
please and space between operator

plese use the same alignement
add an empty line
 + /* invert so that erased block ecc is correct */
 + tmp = ~tmp;
 + ecc_code[0] = (u_char)(tmp);
 + ecc_code[1] = (u_char)(tmp  8);
 + ecc_code[2] = (u_char)(tmp  16);
 +#else
   u_int32_t   tmp;
   int region, n;
   struct nand_chip*this = mtd-priv;
  
   n = (this-eccmode == NAND_ECC_HW12_2048) ? 4 : 1;
  
 + u_char *read_ecc, u_char *calc_ecc)
 +{
 + struct nand_chip *chip = mtd-priv;
 + u_int32_t ecc_nand = read_ecc[0] | (read_ecc[1]  8) |
 +   (read_ecc[2]  16);
 + u_int32_t ecc_calc = calc_ecc[0] | (calc_ecc[1]  8) |
 +   (calc_ecc[2]  16);
 + u_int32_t diff = ecc_calc ^ ecc_nand;
 +
 + if (diff) {
 + if diff12)^diff)  0xfff) == 0xfff) {
please and space between operator
 + /* Correctable error */
please and space between operator
 + if ((diff(12+3))  chip-eccsize) {
 + uint8_t find_bit = 1  ((diff12)7);
please and space between operator
 + uint32_t find_byte = diff(12+3);
uint32_t find_byte = diff  15;
please and space between operator
 + dat[find_byte] ^= find_bit;
 + DEBUG (MTD_DEBUG_LEVEL0, Correcting single bit 
 ECC error at offset: %d, bit: %d\n, find_byte, find_bit);
too long please split
 + return 1;
 + } else {
 + return -1;
 + }
 + } else if (!(diff  (diff-1))) {
please and space between operator
 + /* Single bit ECC error in the ECC itself,
 +nothing to fix */
please use this style of comment
/*
 *
 */
 + DEBUG (MTD_DEBUG_LEVEL0, Single bit ECC error in 
 ECC.\n);
 + return 1;
 + } else {
 + /* Uncorrectable error */
 + DEBUG (MTD_DEBUG_LEVEL0, ECC UNCORRECTED_ERROR 1\n);
 + return -1;
   /* Set address of hardware control function */
   nand-hwcontrol = nand_davinci_hwcontrol;
 Index: u-boot-1.3.3/include/configs/davinci_dvevm.h
 ===
 --- u-boot-1.3.3.orig/include/configs/davinci_dvevm.h 2008-05-19 
 18:47:11.0 +0800
 +++ u-boot-1.3.3/include/configs/davinci_dvevm.h  2008-06-27 
 13:04:07.0 +0800
 @@ -46,6 +46,18 @@
  #define CONFIG_NOR_UART_BOOT
   */
  
 +/*
 + * Previous versions of u-boot (1.3.3 and prior) and Montavista Linux kernels
 + * generated bogus ECCs on large-page NAND. Both large and small page NAND 
 ECCs
 + * were incompatible with the Linux davinci git tree (since NAND was 
 integrated
 + * in 2.6.24).
 + * Don't turn this on if you want backwards compatibility.
 + * Do turn this on if you want u-boot to be able to read and write NAND
 + * that can be written or read by the Linux davinci git kernel.
 + *
 +#define CFG_LINUX_COMPATIBLE_ECC
 + */
please move this in README.davinci
 +

Best Regards,
J.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] Can't compile tools/env for bf537-stamp

2008-06-27 Thread Samuel Zahnd
Hi u-boot users,
 
based on the most recent u-boot repository tag (2008R1.5-RC1 from
blackfin.uclinux.org) we fail to compile the linux tool for print/set u-boot
environment variables (tools/env).
 
 make bf537-stamp_config
 make
No problem with this so far.
 
 make env
See error report in attached file (log.txt).
 
Should this tool be functional for the blackfin architecture (BF537) at all?
We do not understand how the sources/headers of our blackfin linux tree are
referenced for compilation. 
 
Thanks,
-Sam
make -C tools/env all || exit 1
make[1]: Entering directory 
`/home/oscar/tmp/u-boot.2008R1.5-RC1.work/u-boot-1.1.6/tools/env'
bfin-uclinux-gcc -Wall -DUSE_HOSTCC crc32.c  fw_env.c  fw_env_main.c -o 
fw_printenv
crc32.c:15:18: error: zlib.h: No such file or directory
crc32.c:77: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ 
before ‘crc_table’
crc32.c:153: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ 
before ‘crc32’
crc32.c:155: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ 
before ‘*’ token
crc32.c:156: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ 
before ‘len’
crc32.c:157: error: expected identifier or ‘(’ before ‘{’ token
fw_env.c:34:27: error: linux/mtd/mtd.h: No such file or directory
fw_env.c: In function ‘fw_printenv’:
fw_env.c:244: warning: pointer targets in initialization differ in 
signedness
fw_env.c:259: warning: pointer targets in passing argument 1 of ‘fputs’ 
differ in signedness
fw_env.c:262: warning: pointer targets in passing argument 1 of ‘puts’ 
differ in signedness
fw_env.c: In function ‘fw_setenv’:
fw_env.c:293: warning: pointer targets in assignment differ in 
signedness
fw_env.c:317: warning: pointer targets in passing argument 1 of ‘strcmp’ 
differ in signedness
fw_env.c:318: warning: pointer targets in passing argument 1 of ‘strcmp’ 
differ in signedness
fw_env.c:350: warning: pointer targets in passing argument 1 of ‘strlen’ 
differ in signedness
fw_env.c:364: warning: pointer targets in initialization differ in 
signedness
fw_env.c: In function ‘flash_io’:
fw_env.c:390: error: ‘erase_info_t’ undeclared (first use in this 
function)
fw_env.c:390: error: (Each undeclared identifier is reported only once
fw_env.c:390: error: for each function it appears in.)
fw_env.c:390: error: expected ‘;’ before ‘erase’
fw_env.c:393: warning: pointer targets in passing argument 1 of ‘open’ 
differ in signedness
fw_env.c:409: warning: pointer targets in passing argument 1 of ‘open’ 
differ in signedness
fw_env.c:421: error: ‘erase’ undeclared (first use in this function)
fw_env.c:423: error: ‘MEMUNLOCK’ undeclared (first use in this function)
fw_env.c:462: error: ‘MEMERASE’ undeclared (first use in this function)
fw_env.c:519: error: ‘MEMLOCK’ undeclared (first use in this function)
fw_env.c: In function ‘parse_config’:
fw_env.c:717: warning: pointer targets in passing argument 1 of ‘stat’ 
differ in signedness
fw_env.c:724: warning: pointer targets in passing argument 1 of ‘stat’ 
differ in signedness
make[1]: *** [fw_printenv] Error 1
make[1]: Leaving directory 
`/home/oscar/tmp/u-boot.2008R1.5-RC1.work/u-boot-1.1.6/tools/env'
make: *** [env] Error 1
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] Set manually tsec speed in u-boot 1.2.0

2008-06-27 Thread Frank Prepelica
Hi Ben,

The ethernet adapter (PCMCIA ethernet card) which is directly connect to the 
board can be forced in windows to use 100Mbit full duplex, but u-boot still use 
1Gbit. It's a Marvell phy, the exact phy description I have not in mind.
The processor is a mpc8313.

We are using a customized board which based on the MPC8313ERDB board.

Nevertheless, is there a special env variable to set in U-Boot to use another 
speed, in this case 100Mbit? (e.g. I can choose by setting using ethact TSEC1 
which tsec should be used) Is there something equivalent for using tsec speed?

Regards,
Frank


-Ursprüngliche Nachricht-
Von: Ben Warren [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 25. Juni 2008 18:34
An: Frank Prepelica
Cc: u-boot-users@lists.sourceforge.net
Betreff: Re: [U-Boot-Users] Set manually tsec speed in u-boot 1.2.0

Hi Frank,

Frank Prepelica wrote:

 Hi all,

  

 is there a way to set the tsec speed in u-boot (v1.2.0) manually to 
 100Mbit? Because u-boot always uses 1Gbit although the

 link speed is fixed set(in windows) to 100Mbit.

  

How does Windows fit into this?  Are you booting Windows on the board?  
Are you connecting to a Windows machine via a crossover, via a switch, 
or something else?  What PHY is connected to the TSEC?  What processor 
are you using?

regards,
Ben

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] Problems with root JFFS2 on NAND Flash

2008-06-27 Thread Kenneth Johansson

On Thu, 2008-06-26 at 14:16 -0400, Stuart Wood wrote:
 On Thu, Jun 26, 2008 at 1:55 PM, Grant Erickson
  Are you certain that u-boot and linux are in agreement about the NAND layout
  and format? I had some initial problems in that area until I applied a patch
  to u-boot (prior to 1.3.3) that addressed the issue and brought the two into
  agreement.
 
 Can you expand on this? I've set the partition tables to be the same
 between the two,
 but I'm not sure what else needs to synchronized. MTD version?

jffs2 stores the cleanmarker in the oob area. u-boot and linux needs to
be configured so it is stored in the same place in the oob area.

do an erase with cleanmarker from u-boot and read out what is stored in
oob then do the same under linux and you will probably have the
cleanmarker att different places.

if you do not see the cleanmarker you have it in the same place as ecc
and that is also wrong.

fixing it is specific to the nand chip and nand controller that is used.


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] Set manually tsec speed in u-boot 1.2.0

2008-06-27 Thread Ben Warren
On Fri, Jun 27, 2008 at 2:37 AM, Frank Prepelica
[EMAIL PROTECTED] wrote:
 Hi Ben,

 The ethernet adapter (PCMCIA ethernet card) which is directly connect to the 
 board can be forced in windows to use 100Mbit full duplex, but u-boot still 
 use 1Gbit. It's a Marvell phy, the exact phy description I have not in mind.
 The processor is a mpc8313.

 We are using a customized board which based on the MPC8313ERDB board.

 Nevertheless, is there a special env variable to set in U-Boot to use another 
 speed, in this case 100Mbit? (e.g. I can choose by setting using ethact 
 TSEC1 which tsec should be used) Is there something equivalent for using tsec 
 speed?

I don't see any way to set it explicitly, but the default mode is
autonegotiate, so the TSEC will run at the highest rate supported by
its peer.  I plug these things into 10/100 switches all the time and
they work fine.  What problem are you seeing.

regards,
Ben

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] Set manually tsec speed in u-boot 1.2.0

2008-06-27 Thread Ben Warren
On Fri, Jun 27, 2008 at 2:37 AM, Frank Prepelica
[EMAIL PROTECTED] wrote:
 Hi Ben,

 The ethernet adapter (PCMCIA ethernet card) which is directly connect to the 
 board can be forced in windows to use 100Mbit full duplex, but u-boot still 
 use 1Gbit. It's a Marvell phy, the exact phy description I have not in mind.
 The processor is a mpc8313.

 We are using a customized board which based on the MPC8313ERDB board.

 Nevertheless, is there a special env variable to set in U-Boot to use another 
 speed, in this case 100Mbit? (e.g. I can choose by setting using ethact 
 TSEC1 which tsec should be used) Is there something equivalent for using tsec 
 speed?

I don't see any way to set it explicitly, but the default mode is
autonegotiate, so the TSEC will run at the highest rate supported by
its peer.  I plug these things into 10/100 switches all the time and
they work fine.  What problem are you seeing.

regards,
Ben

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] How to specify the starting function of aU-boot standalone application.

2008-06-27 Thread richardretanubun
Hi Guys,

I found this in the u-boot FAQ (is there anything that thing can't 
answer? :D)

http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork

Of course, Jason's solution is also nice. Thanks for that!

Regards,

- Richard Retanubun

Jens Gehrlein wrote:
 Hi Jason,

 McMullan, Jason schrieb:
 On Wed, 2008-06-25 at 07:44 +0200, Jens Gehrlein wrote:
 I have the same problem. When I modify the source code the compiler 
 may or may not rearrange the functions. It is not guaranteed, that 
 the main function always starts at the same address.

 How can this be solved? Is it possible/meaningful to put the main 
 function into a separate linker segment? Any suggestions?

 The simplest way I've found is to make the following C file:

 --- _start.c ---
 void _start(void)
 {
 extern int main(int argc, char **argv);
 char *args[] = { myprogramname, -foo, bar, /* etc. etc. */ };
 main(sizeof(args)/sizeof(args[0]), args);
 /* Wait forever after the program ends */
 for (;;);
 }
 -

 Then, link '_start.o' before *any* other objects in your link step.

 Voila! The text entry should be _start!

 Feel free to add BSS initialization, etc. in _start as needed.

 Very nice. Thank you for this tip!

 Best Regards,
 Jens


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] Modifications to video-related files for RRvision.

2008-06-27 Thread Detlev Zundel
Hi Rodolfo,

 On Tue, Jun 24, 2008 at 05:05:23PM +0200, Gary Jennejohn wrote:
 On Tue, 24 Jun 2008 14:14:23 +0200
 Rodolfo Giometti [EMAIL PROTECTED] wrote:
 
  On Mon, Jun 23, 2008 at 04:54:38PM +0200, Gary Jennejohn wrote:
   
Note that the LOGO_X/LOG_Y macros are defined in RRvision.h to center
the logo on the screen and might be useful for other boards.
Signed-off-by: Gary Jennejohn [EMAIL PROTECTED]
  
  Nak. This is a multi-patch.
  
  Please provide a patch for the LOGO_X/LOG_Y macros and a patch for
  RRvision board, then send the first to me and the second to the proper
  maintainer.
  
 
 Wolfgang Denk imformed me that the lcd/video patches had to go to the
 proper custodian and I only found your name listed for video.
 
 So, who _is_ the proper target for this stuff?  Wolfgang doesn't want
 to see it.

 I'm the video custodian, so I can decide about lcd/video stuff,
 regarding specific boards modifications you should check the
 custodians list.

Can you explain that to me?  Gary changes three files:

 common/lcd.c   |9 +++-
 cpu/mpc8xx/lcd.c   |  138 +---
 cpu/mpc8xx/video.c |   22 -
 3 files changed, 159 insertions(+), 10 deletions(-)

None of this is specific to a board but really concerns lcd and video
handling.  If you don't feel responsible for it, the only other
custodian could be the 8xx custodian.  But he already pointed Gary to
you ;)

So please, if nobody from the 8xx front NAKs the patches, pull it into
your custodian repository.

Thanks
  Detlev

-- 
The continental people think life is a game. The English think
cricket is a game.
 -- George Mikes
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] (no subject)

2008-06-27 Thread 钟文辉
各位老总:您们好!

诚祝:您们在2008年里;有鼠不尽的快乐!鼠不尽的收获!鼠不尽的钞票!
 
鼠不尽的幸福!鼠不尽的美满生活!愿: 您们阖家欢乐!幸福安康!

我公司可以长期提供:出口报关单,核销单,等等一系列手续;代理:出口

报关,商检,境内外运输..等等;还可以代办:出口欧盟许可证,欧盟产地证;

并且还有(广州国际贸易交易会)的摊位可以转让;价格特别优惠;有意者请来邮件

或来电联系。谢谢合作!
 
  电话:0755-81153047。
 
  传真:0755-81172940。
 
  手机:15817477278。
 
  联系人:钟文辉。
 
   
  电子邮箱:[EMAIL PROTECTED]  


此致:
 

敬礼!

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] [PATCH] Fix usb part command

2008-06-27 Thread Christian Eggers
From: Christian Eggers [EMAIL PROTECTED]

Only print partition for selected device if user supplied the dev arg with 
the usb part [dev] command.

Signed-off-by: Christian Eggers [EMAIL PROTECTED]
---
 common/cmd_usb.c |   19 +++
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index 9be86b8..ed51087 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -553,13 +553,24 @@ int do_usb (cmd_tbl_t *cmdtp, int flag,
}
 
if (strncmp(argv[1],part,4) == 0) {
-   int devno, ok;
-   for (ok=0, devno=0; devnoUSB_MAX_STOR_DEV; ++devno) {
+   int devno, ok = 0;
+   if (argc==2) {
+   for (devno=0; devnoUSB_MAX_STOR_DEV; ++devno) {
+   stor_dev=usb_stor_get_dev(devno);
+   if (stor_dev-type!=DEV_TYPE_UNKNOWN) {
+   ok++;
+   if (devno)
+   printf(\n);
+   printf(print_part of %x\n,devno);
+   print_part(stor_dev);
+   }
+   }
+   }
+   else {
+   devno=simple_strtoul(argv[2], NULL, 16);
stor_dev=usb_stor_get_dev(devno);
if (stor_dev-type!=DEV_TYPE_UNKNOWN) {
ok++;
-   if (devno)
-   printf(\n);
printf(print_part of %x\n,devno);
print_part(stor_dev);
}
-- 
1.4.3.4


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] Booting Multi Image FIle

2008-06-27 Thread Alemao
Solved with:

bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}

But, is there a way of getting this values instead of searching with a
hexeditor through the image??

On Thu, Jun 26, 2008 at 2:26 PM, Alemao [EMAIL PROTECTED] wrote:
 Hi all,

 I have a board here that was fully working when booting using the tree
 files separated. Now im trying
 using a multi image file:

 # mkimage -A ppc -O Linux -T multi -C gzip -n 'Linux PowerPC' -d
 vmlinux.bin.gz:ramdisk:board.dtb kernel.img

 Loading to ram:

 # tftpboot 0x0100 kernel.img

 Booting:

 # bootm 0x0100

 ## Booting image at 0100 ...
   Image Name:   Linux PowerPC
   Image Type:   PowerPC Linux Multi-File Image (gzip compressed)
   Data Size:2627156 Bytes =  2.5 MB
   Load Address: 
   Entry Point:  
   Contents:
   Image 0:   916112 Bytes = 894.6 kB
   Image 1:  1698738 Bytes =  1.6 MB
   Image 2:12288 Bytes = 12 kB
   Verifying Checksum ... OK
   Uncompressing Multi-File Image ... OK
   Loading Ramdisk to 07de2000, end 07f80bb2 ... OK
   Loading Device Tree to 007fc000, end 007fefff ... OK
   .
   .
   .
   RAMDISK: Couldn't find valid RAM disk image starting at 0.
   No filesystem could mount root, tried:  ext2
   Kernel panic - not syncing: VFS: Unable to mount root fs on
 unknown-block(1,0)


 Im missing something? Do i have to pass the addr of ramdisk at bootm ?


 Thanks in advance,

 --
 Alemao


--
Alemao

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] at91sam9260-ek intermittenly fails at u-boot init

2008-06-27 Thread Norman Cheung
Dear all,

I am still struggling with this problem, but getting to reproduce this 
problem repeatably.  Hoping folks in the forum can give me some 
pointers.  Our Atmel FAE is clueless also.

This is repeatable, on two boards (both 9260 Rev A and Rev B):
- bootstrap, u-boot, kernel, RFS all downloaded to NAND with SAM-BA 2.6
- Without recycle power, just push reset button; u-boot will come up.  
And I can continue to boot Kernel (2.6.25)
- Push reset second time(and subsequent times), bootstrap will run and 
fail in the first few instruction of u-boot
- Sometimes power cycle, u-boot will come up again

- When it runs, if I has u-boot boot kernel, linux will run. 
- Push reset button in Linux board will reboot and u-boot will run again 
(all the times)
- If I use linux reboot, the board will stop after running bootstrap 
and  (I believe) branched to u-boot.

Our h/ware guy has checked all the timing NAND, SDRAM etc and we have 
experimented with all the settings. 

Thanks in advance for your help,
Norman

Norman Cheung wrote:
 Many thanks Stelian for the replies.  My comments inline.

 Norman

 Stelian Pop wrote:
 Le mercredi 25 juin 2008 à 01:36 +, Norman Cheung a écrit :
  
 I am struggling with this problem for a week now and not making any 
 progress. So any suggestions, ideas or pointer will be greatly 
 appreciated.
 
 [...]

   
 Since the post earlier, I have narrowed the problem to the bootstrap 
 during the copy from NAND to SDRAM, memories are corrupted.  I think I 
 have a marginal NAND chip.  I played around the  SMC  cycle timing  in 
 bootstrap,  I have a setting that I can boot u-boot with power cycle 6 
 out of 10 times.  So I am convinced that it is not an u-boot issue, 
 Thanks!
 The board works with u-boot 1.3.2 and at91bootstrap(1.5 I only have 
 the binary)
 booting from NAND.
 

 The source (for the latest version) is freely available on the Atmel
 site: http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4093

 If you really need the source for an older version, I'm sure the Atmel
 support will send it to you upon request.

  
 U-boot fails intermittently at the start.  When it fails, it didn't 
 make it to
 my first printf statement.  When I use JTAG to debug it, it always 
 works. 
 If the board has been let without power for 1+ hour, it will also 
 boot up when I apply power to it(something to do with the battery 
 perhaps).
 

 Did you try disconnecting the battery ? Or replacing the battery with a
 new one ?

 [...]
   
 I tried disconnecting the battery and with the new SMC timing changes, 
 I can boot up only one time after disconnecting the battery.  I will 
 go and get a new battery.
 
 We had at91bootstrap 1.5 working well in 32-bit mode with u-boot 
 1.3.2.  But I
 don't have the source.
 

 See above.

  
   I wonder what is the current stable version of u-boot
 and at91bootstrap? 

 AT91Bootstrap seems to be at v1.9.

 As for U-Boot, try the latest git (which will soon be u-boot v1.3.4).

 (BTW, if Wolfgang is listening, it would be nice to have proper tags in
 git as well as releases on the ftp server for the -pre version. Since
 the merge window is closed, I guess we're up to v1.3.4-pre1 now, but
 this version tag cannot be found anywhere...)

 Stelian.
   




-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH RFC] ARM: Davinci: NAND fix for large page ECC and linux compatibility

2008-06-27 Thread Bernard Blackham
[offlist thread cc'd back to the list - hope you don't mind Scott!]

Hi Scott,

Thanks for your feedback.

On Fri, Jun 27, 2008 at 12:04:00PM -0500, Scott Wood wrote:
Bernard Blackham wrote: 
 What I would like to know though, is are you the right person to
 push this through, and can it make it into U-boot 1.3.4? I'm asking
 because it contains potential compatibility breaks, and I'd like to
 document the specific U-boot versions that will be affected.

 There is a general ARM tree, but I can take it through mine if that's  
 what is preferred.

That was the suggestion on #uboot. I'd say it's more NAND related
than ARM related too.

 +/*
 + * Previous versions of u-boot (1.3.3 and prior) and Montavista Linux 
 kernels
 + * generated bogus ECCs on large-page NAND. Both large and small page NAND 
 ECCs
 + * were incompatible with the Linux davinci git tree (since NAND was 
 integrated
 + * in 2.6.24).
 + * Don't turn this on if you want backwards compatibility.
 + * Do turn this on if you want u-boot to be able to read and write NAND
 + * that can be written or read by the Linux davinci git kernel.
 + *
 +#define CFG_LINUX_COMPATIBLE_ECC
 + */

 It seems odd that backwards compatibility requires turning *off* an  
 option with compatible in the name...  I'd invert the sense of the  
 ifdef, and have it be something like CFG_BROKEN_ECC_COMPATIBILITY.

The concern with this is people that use their own custom config
files will need to add this #define when they upgrade. How about
just changing the name to CFG_NEW_NAND_ECC_FORMAT then?

 If the old way of doing small page ECC was valid, should we preserve  
 that (and change Linux back)?

That's a little controversial. Basically, the old OOB layout didn't
match any other layout used (except by the MV kernel), the actual
ECC layout meant that the method for correction was overly complex
(with 170 non-obvious lines of code), and allegedly broken:
   http://article.gmane.org/gmane.comp.boot-loaders.u-boot/32035

The new code is about 30 lines, really simple, and I can even prove
it's correctness (which I couldn't even begin to with the old code).
Troy (cc'd) I believe was the original author.  It could probably do
with some comments though to make it dead obvious to the casual
observer what's going on. I'll add them in.

 We should probably default to doing it the right way, not the  
 broken-but-compatible way for large pages, though.

It depends if you put backwards compatibility over reliability
though. Many davinci users are still running the MontaVista-supplied
2.6.10 kernel which has the same broken ECC code and I've heard no
word from MV on fixing it yet (and they're probably struggling to
deal with the same backwards compatibility issue).

How about this solution: in davinci/nand.c, we add something like
this:

#if defined(CFG_NAND_LARGEPAGE)  !defined(CFG_LINUX_COMPATIBLE_ECC)
/* Comment this #error out only if you really really have to. */
#error You are using old ECC code that is broken on large page devices. See 
doc/README.davinci
#endif

This forces the user to make a choice - they'll probably curse while
they're doing it, but they can't plead ignorance when they find
their large page NAND isn't detecting ECC errors.

 Perhaps we could use some currently unused OOB byte as a marker
 for new/old ECC layout?

Could do, but any filesystems which use the OOB bytes might step on
these. It also complicates the code even moreso and creates a lot
more scenarios to test and that could go wrong.

I really do believe it should be a clean switch from one format to
the other, for both small and large page NAND, with no run-time
backwards compatibility. But that's just my POV.

Cheers,
Bernard.


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] (no subject)

2008-06-27 Thread 钟文辉
各位老总:您们好!

诚祝:您们在2008年里;有鼠不尽的快乐!鼠不尽的收获!鼠不尽的钞票!
 
鼠不尽的幸福!鼠不尽的美满生活!愿: 您们阖家欢乐!幸福安康!

我公司可以长期提供:出口报关单,核销单,等等一系列手续;代理:出口

报关,商检,境内外运输..等等;还可以代办:出口欧盟许可证,欧盟产地证;

并且还有(广州国际贸易交易会)的摊位可以转让;价格特别优惠;有意者请来邮件

或来电联系。谢谢合作!
 
  电话:0755-81153047。
 
  传真:0755-81172940。
 
  手机:15817477278。
 
  联系人:钟文辉。
 
   
  电子邮箱:[EMAIL PROTECTED]  


此致:
 

敬礼!

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users