public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] maybe a bug for flash write, CFI_CMDSET_AMD_LEGACY
@ 2009-07-15  1:25 cheng gao
  2009-07-15  3:48 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: cheng gao @ 2009-07-15  1:25 UTC (permalink / raw)
  To: u-boot

u-boot-2009.06\drivers\mtd\cfi_flash.c
Line: 836~845
Function: flash_write_cfiword

case CFI_CMDSET_AMD_EXTENDED:
    case CFI_CMDSET_AMD_STANDARD:
#ifdef CONFIG_FLASH_CFI_LEGACY
    case CFI_CMDSET_AMD_LEGACY:
#endif
        sect = find_sector(info, dest);
        flash_unlock_seq (info, sect);
        flash_write_cmd (info, sect, info->addr_unlock1, AMD_CMD_WRITE);
        sect_found = 1;
        break;


It should be :

       case CFI_CMDSET_AMD_EXTENDED:
       case CFI_CMDSET_AMD_STANDARD:

        sect = find_sector(info, dest);
        flash_unlock_seq (info, sect);
        flash_write_cmd (info, sect, info->addr_unlock1, AMD_CMD_WRITE);
        sect_found = 1;
        break;
#ifdef CONFIG_FLASH_CFI_LEGACY
    case CFI_CMDSET_AMD_LEGACY:
    flash_unlock_seq (info, 0);
    flash_write_cmd (info, 0, info->addr_unlock1, AMD_CMD_WRITE);
     sect_found = 1;
    break;
#endif

  to make it work for SST39LF040 which is only 4k per serctor.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-15  3:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-15  1:25 [U-Boot] maybe a bug for flash write, CFI_CMDSET_AMD_LEGACY cheng gao
2009-07-15  3:48 ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox