Commit 692e8ab3 authored by Sergei Poselenov's avatar Sergei Poselenov

RT #72064. Added udelay(100) before checking the status of the write op.

parent dcde2a00
......@@ -752,6 +752,10 @@ static int flash_write_cfiword (flash_info_t * info, ulong dest,
if (!sect_found)
sect = find_sector (info, dest);
#ifdef CONFIG_SYS_STM32
/* FIXME: remove this workaround for ST-MEM */
udelay(100);
#endif
return flash_full_status_check (info, sect, info->write_tout, "write");
}
......@@ -984,13 +988,16 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
flash_unlock_seq (info, sect);
flash_write_cmd (info, sect, 0,
AMD_CMD_ERASE_SECTOR);
/* Wait before checking the status.
#ifdef CONFIG_SYS_STM32
/* FIXME: remove this workaround for ST-MEM.
* Wait before checking the status.
* This is added after the similar delay in
* linux/drivers/mtd/chips/cfi_cmdset_0002.c:do_erase_oneblock().
* FIXME: why erase_blk_tout is so big, vs to
* the value in the Linux mtd driver?
*/
udelay(500000);
#endif
break;
#ifdef CONFIG_FLASH_CFI_LEGACY
case CFI_CMDSET_AMD_LEGACY:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment