Add sync at the end of flash_write_cmd for [...]
PATCH 1/1 Add sync at the end of flash_write_cmd for [...]
Hello list,
inside the automatic U-Boot patch tracking system a new ticket [DNX#2007020542000021] was created:
<snip>
Quoted 30 lines
Add sync at the end of
flash_write_cmdfor MPC86xx
to ensure write command are really finished before reading dataSigned-off-by Haiying Wang <[email protected]>---
According to Tolunay's first suggestion, this patch forcfi_flashdriver fixed the flash operation error on MPC8641HPCN board. Since there is not such flash error reported on 85xx, 83xx platform and as Tolunay said, there is not a PowerPC macro to define, I just useCONFIG_MPC86xxfor now. I also tested his second suggestion(adding udelay directly after reset command), but flash still failed to work.Based on my tests before (I added udelay after the
flash_write_cmd()which switched flash to CFI read mode, and it worked as well) and the test with this patch, I think that most possible fix of this issue should
be that we should make sure command has been fully executed before return to data read mode(as in his first suggestion). So please review this patch below:drivers/cfi_flash.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)drivers/cfi_flash.c +0
-0@@ -971,6 +971,9 @@ static void flash_write_cmd (flash_info_t * info,
flash_sect_tsect, uint offset
#endif
drivers/cfi_flash.c
Quoted 8 lines
drivers/cfi_flash.c +3
-0break ; } +#ifdef CONFIG_MPC86xx + asm("sync;" ); +#endif }static void flash_unlock_seq (flash_info_t * info,flash_sect_t sect)
</snip>
Your U-Boot support team