aboutsummaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
authorTomas Vanek <vanekt@fbl.cz>2018-11-16 00:23:10 +0100
committerTomas Vanek <vanekt@fbl.cz>2019-04-03 21:58:07 +0100
commit07da3b3913dcb6b65564f4fe67c2f26032f180c0 (patch)
tree4836b9fb1dd123212bac7984bafd778cefa59368 /src/flash
parent076802606a46dc2fe03946ab686467593e35a3d8 (diff)
downloadriscv-openocd-07da3b3913dcb6b65564f4fe67c2f26032f180c0.zip
riscv-openocd-07da3b3913dcb6b65564f4fe67c2f26032f180c0.tar.gz
riscv-openocd-07da3b3913dcb6b65564f4fe67c2f26032f180c0.tar.bz2
flash/nor/core.h: clarify comment flash_sector::is_erased
Setting of flash_sector::is_erased in flash erase and mass erase is popular folklore. Make clear it is useless. Change-Id: Ide397eb6d24fc8fa38931e6c8a0693d39668a5d2 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4768 Tested-by: jenkins Reviewed-by: Christopher Head <chead@zaber.com>
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/nor/core.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/flash/nor/core.h b/src/flash/nor/core.h
index f6bd0cf..a8edb2d 100644
--- a/src/flash/nor/core.h
+++ b/src/flash/nor/core.h
@@ -45,9 +45,12 @@ struct flash_sector {
uint32_t size;
/**
* Indication of erasure status: 0 = not erased, 1 = erased,
- * other = unknown. Set by @c flash_driver_s::erase_check.
+ * other = unknown. Set by @c flash_driver_s::erase_check only.
*
- * Flag is not used in protection block
+ * This information must be considered stale immediately.
+ * Don't set it in flash_driver_s::erase or a device mass_erase
+ * Don't clear it in flash_driver_s::write
+ * The flag is not used in a protection block
*/
int is_erased;
/**