]> git.gag.com Git - fw/openocd/commitdiff
flash/nor/core.h: clarify comment flash_sector::is_erased
authorTomas Vanek <vanekt@fbl.cz>
Thu, 15 Nov 2018 23:23:10 +0000 (00:23 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Wed, 3 Apr 2019 20:58:07 +0000 (21:58 +0100)
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>
src/flash/nor/core.h

index f6bd0cf1aea34b6b7e92db56ad7bcf96d57d625a..a8edb2dc9b53b139f473172eea12d2371feb4367 100644 (file)
@@ -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;
        /**