aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/str9x.c
diff options
context:
space:
mode:
authorMarc Schink <dev@zapb.de>2021-05-07 12:02:23 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2021-08-14 13:32:07 +0100
commit38f94a26772f2e1c99e4e65ac1b60bc9e1bb150a (patch)
tree492d78691cfbb081d159664bfe9254e1a29bdd04 /src/flash/nor/str9x.c
parenta555434c50544410ab6f8915f1e2a829cc6e6de2 (diff)
downloadriscv-openocd-38f94a26772f2e1c99e4e65ac1b60bc9e1bb150a.zip
riscv-openocd-38f94a26772f2e1c99e4e65ac1b60bc9e1bb150a.tar.gz
riscv-openocd-38f94a26772f2e1c99e4e65ac1b60bc9e1bb150a.tar.bz2
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 07da3b3913dcb6b65564f4fe67c2f26032f180c0 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>
Diffstat (limited to 'src/flash/nor/str9x.c')
-rw-r--r--src/flash/nor/str9x.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/flash/nor/str9x.c b/src/flash/nor/str9x.c
index 5c3a9cb..8f39d75 100644
--- a/src/flash/nor/str9x.c
+++ b/src/flash/nor/str9x.c
@@ -300,9 +300,6 @@ static int str9x_erase(struct flash_bank *bank, unsigned int first,
break;
}
- for (unsigned int i = first; i <= last; i++)
- bank->sectors[i].is_erased = 1;
-
return ERROR_OK;
}