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
@@ -520,16 +520,9 @@ static int psoc4_mass_erase(struct flash_bank *bank)
|
||||
|
||||
/* Call "Erase All" system ROM API */
|
||||
uint32_t param = 0;
|
||||
retval = psoc4_sysreq(bank, PSOC4_CMD_ERASE_ALL,
|
||||
return psoc4_sysreq(bank, PSOC4_CMD_ERASE_ALL,
|
||||
0,
|
||||
¶m, sizeof(param), NULL);
|
||||
|
||||
if (retval == ERROR_OK)
|
||||
/* set all sectors as erased */
|
||||
for (unsigned int i = 0; i < bank->num_sectors; i++)
|
||||
bank->sectors[i].is_erased = 1;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user