flash/nor: Do not update 'is_erased'
Remove useless setting of the 'is_erased' flag after a flash
modification. Also, remove code that erroneously depends on
this flag.
Keep the flag for now since it is still used by the
erase_check() functionality.
See commit 07da3b3913
Change-Id: Ia046905bc9e0cb2572145f19251c3e10c4e2d553
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/6279
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
a555434c50
commit
38f94a2677
@@ -870,9 +870,7 @@ static int cfi_intel_erase(struct flash_bank *bank, unsigned int first,
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
|
||||
if (status == 0x80)
|
||||
bank->sectors[i].is_erased = 1;
|
||||
else {
|
||||
if (status != 0x80) {
|
||||
retval = cfi_send_command(bank, 0xff, cfi_flash_address(bank, 0, 0x0));
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
@@ -927,9 +925,7 @@ static int cfi_spansion_erase(struct flash_bank *bank, unsigned int first,
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
|
||||
if (cfi_spansion_wait_status_busy(bank, cfi_info->block_erase_timeout) == ERROR_OK)
|
||||
bank->sectors[i].is_erased = 1;
|
||||
else {
|
||||
if (cfi_spansion_wait_status_busy(bank, cfi_info->block_erase_timeout) != ERROR_OK) {
|
||||
retval = cfi_send_command(bank, 0xf0, cfi_flash_address(bank, 0, 0x0));
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
|
||||
Reference in New Issue
Block a user