diff options
author | Baruch Siach <baruch@tkos.co.il> | 2014-09-04 12:23:09 +0300 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2014-10-06 14:12:12 +0200 |
commit | 91693055995733e268874ae75568ae316233e116 (patch) | |
tree | 22b3314fa1cc3a11a6e7b597f5166b965d87e7c1 /drivers/mtd/cfi_flash.c | |
parent | b966db0d7259293e2c9c216c7a5dce30dacacfd9 (diff) | |
download | u-boot-imx-91693055995733e268874ae75568ae316233e116.zip u-boot-imx-91693055995733e268874ae75568ae316233e116.tar.gz u-boot-imx-91693055995733e268874ae75568ae316233e116.tar.bz2 |
cfi_flash: don't hide write/erase errors
Partially revert commit 0d01f66d235118 (CFI: cfi_flash write fix for AMD
legacy).
flash_full_status_check() used to skip status register parsing when
flash_status_check() returns OK. This is wrong since flash_status_check()
must return OK for other status bits to be valid.
Cc: Ed Swarthout <Ed.Swarthout@freescale.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/mtd/cfi_flash.c')
-rw-r--r-- | drivers/mtd/cfi_flash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index c4b5bc1..9b3175d 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -593,7 +593,7 @@ static int flash_full_status_check (flash_info_t * info, flash_sect_t sector, case CFI_CMDSET_INTEL_PROG_REGIONS: case CFI_CMDSET_INTEL_EXTENDED: case CFI_CMDSET_INTEL_STANDARD: - if ((retcode != ERR_OK) + if ((retcode == ERR_OK) && !flash_isequal (info, sector, 0, FLASH_STATUS_DONE)) { retcode = ERR_INVAL; printf ("Flash %s error at address %lx\n", prompt, |