Fixed write_page_write_jedec() in jedec.c. Added a check-reprogram loop in the same function, to come around the high page write failure rate on some boards.
Signed-off-by: Giampiero Giancipoli gianci@email.it --
this part is unnecessarily complex, and will miss problems that might occur (weird ones but )...
+ dst = d; + src = s; + ok = 1; + for (i = 0; i < page_size; i++) { + if (*src != 0xFF) + if ( *dst != *src ) + { + ok = 0; + break; + } + dst++; + src++; + } + + if (!ok && tried++ < 0x10) { + start_index = i; + goto retry; + } + if (!ok) { + fprintf( stderr, " page %d failed!\n", (d-bios)/page_size ); + }
how about this?
+ dst = d; + src = s; + ok = 1; + for (i = 0; i < page_size; i++) { + + if ( *dst != *src ) + { + ok = 0; + break; + } + dst++; + src++; + } + + if (!ok && tried++ < 0x10) { + start_index = i; + goto retry; + } + if (!ok) { + fprintf( stderr, " page %d failed!\n", (d-bios)/page_size ); + }
On Mon, Nov 20, 2006 at 07:48:18PM -0700, ron minnich wrote:
this part is unnecessarily complex, and will miss problems that might occur (weird ones but )...
We need to re-implement memcmp() because it's volatile, or..?
//Peter
On 11/20/06, Peter Stuge stuge-linuxbios@cdy.org wrote:
On Mon, Nov 20, 2006 at 07:48:18PM -0700, ron minnich wrote:
this part is unnecessarily complex, and will miss problems that might occur (weird ones but )...
We need to re-implement memcmp() because it's volatile, or..?
You might want to print out each and every different location. It can be very useful to have the option of doing that.
ron
* Giampiero Giancipoli gianci@email.it [061120 09:14]:
Fixed write_page_write_jedec() in jedec.c. Added a check-reprogram loop in the same function, to come around the high page write failure rate on some boards.
Signed-off-by: Giampiero Giancipoli gianci@email.it
Thank you very much! The patch is applied.