
23 Aug
2005
23 Aug
'05
11:01 p.m.
Hello..
It seems that there is a minor problem in cfi_flash.c that prevents it from detecting that a flash write error has occurred.
The first change in the attached patch is trivial, it just makes the strings output for a protected and a non-protected sector have the same length so the output looks prettier..
The second change is in flash_full_status_check(). We have just called flash_status_check() and then did a switch() on the vendor. For intel, we *should* check if there are any error bits if the previous call returned ERR_OK (Otherwise we will have output an error message in flash_status_check() already.) The original code would only check for error bits if flash_status_check() returns ERR_TIMEOUT.
--
Marcus Hall
marcushall@lucent.com
*** ../u-boot-1.1.3/drivers/cfi_flash.c Sat Aug 13 17:53:35 2005
--- u-boot-1.1.3/drivers/cfi_flash.c Tue Aug 23 14:47:06 2005
***************
*** 502,508 ****
if ((i % 5) == 0)
printf ("\n ");
printf (" %08lX%s",
! info->start[i], info->protect[i] ? " (RO) " : " ");
#endif
}
putc ('\n');
--- 502,508 ----
if ((i % 5) == 0)
printf ("\n ");
printf (" %08lX%s",
! info->start[i], info->protect[i] ? " (RO)" : " ");
#endif
}
putc ('\n');
***************
*** 718,724 ****
switch (info->vendor) {
case CFI_CMDSET_INTEL_EXTENDED:
case CFI_CMDSET_INTEL_STANDARD:
! if ((retcode != ERR_OK)
&& !flash_isequal (info, sector, 0, FLASH_STATUS_DONE)) {
retcode = ERR_INVAL;
printf ("Flash %s error at address %lx\n", prompt,
--- 718,724 ----
switch (info->vendor) {
case CFI_CMDSET_INTEL_EXTENDED:
case CFI_CMDSET_INTEL_STANDARD:
! if ((retcode == ERR_OK)
&& !flash_isequal (info, sector, 0, FLASH_STATUS_DONE)) {
retcode = ERR_INVAL;
printf ("Flash %s error at address %lx\n", prompt,