[U-Boot-Users] [DNX#2007020542000021] [PATCH] Add sync at the end of flash_write_cmd for [...]

OTRS Notification Master otrs at denx.de
Mon Feb 5 21:20:03 CET 2007


Hello list,

inside the automatic U-Boot patch tracking system a new ticket
[DNX#2007020542000021] was created:

<snip>
> 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 <haiying.wang at freescale.com>
> ---
> 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)
</snip>

Your U-Boot support team



More information about the U-Boot mailing list