aboutsummaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2010-01-08 16:47:58 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2010-01-08 16:47:58 -0800
commit296a011db5833b8a3258a058e6a805cc5ddb2bfe (patch)
tree73340cadbb2cc9eb226e13ec0f8a34136bf7e013 /src/flash
parent12c143d5948355b3b54c9c0decc779177b22d5d9 (diff)
downloadriscv-openocd-296a011db5833b8a3258a058e6a805cc5ddb2bfe.zip
riscv-openocd-296a011db5833b8a3258a058e6a805cc5ddb2bfe.tar.gz
riscv-openocd-296a011db5833b8a3258a058e6a805cc5ddb2bfe.tar.bz2
NOR: add FIXMEs for writing ones
It can invalidate ECC codes, and in general is not guaranteed to work. (However on some chips it _appears_ to behave.) Just don't do it; don't write in those cases. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/nor/core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c
index 01088f3..7e783d4 100644
--- a/src/flash/nor/core.c
+++ b/src/flash/nor/core.c
@@ -449,9 +449,12 @@ int flash_write_unlock(struct target *target, struct image *image,
break;
}
- /* REVISIT This needlessly touches sectors BETWEEN the
+ /* FIXME This needlessly touches sectors BETWEEN the
* sections it's writing. Without auto erase, it just
- * writes ones; unlikely to destroy data.
+ * writes ones. That WILL INVALIDATE data in cases
+ * like Stellaris Tempest chips, corrupting internal
+ * ECC codes; and at least FreeScale suggests issues
+ * with that approach (in HC11 documentation).
*
* With auto erase enabled, data in those sectors will
* be needlessly destroyed; and some of the limited