From: OTRS Notification Master Date: Mon, 5 Feb 2007 21:20:03 +0100 Subject: [U-Boot-Users] [DNX#2007020542000021] [PATCH] Add sync at the end of flash_write_cmd for [...] Message-ID: <1170706803.760776.579118044@castor.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello list, inside the automatic U-Boot patch tracking system a new ticket [DNX#2007020542000021] was created: > Add sync at the end of flash_write_cmd for MPC86xx > to ensure write command are really finished before reading data > > Signed-off-by: Haiying Wang > --- > According to Tolunay's first suggestion, this patch for cfi_flash > driver 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 use CONFIG_MPC86xx > for 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(-) > > diff --git a/drivers/cfi_flash.c b/drivers/cfi_flash.c > index 696f9a4..a93e94d 100644 > --- a/drivers/cfi_flash.c > +++ b/drivers/cfi_flash.c > @@ -971,6 +971,9 @@ static void flash_write_cmd (flash_info_t * info, > flash_sect_t sect, uint offset > #endif > break; > } > +#ifdef CONFIG_MPC86xx > + asm("sync;"); > +#endif > } > > static void flash_unlock_seq (flash_info_t * info, flash_sect_t sect) Your U-Boot support team