summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-05-05 15:08:34 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-05-05 15:24:25 +0200
commit737c9b6258c6e68714ae264ff36126eb5d382d6a (patch)
tree508ba9ecd384a3f4d2fda13231d5fe53161e8c78 /src/target
parentf7e0f3c285e9b1578184da886792e02d253ea687 (diff)
downloadopenocd+libswd-737c9b6258c6e68714ae264ff36126eb5d382d6a.tar.gz
openocd+libswd-737c9b6258c6e68714ae264ff36126eb5d382d6a.tar.bz2
openocd+libswd-737c9b6258c6e68714ae264ff36126eb5d382d6a.tar.xz
openocd+libswd-737c9b6258c6e68714ae264ff36126eb5d382d6a.zip
flash: stop caching protection state
There are a million reasons why cached protection state might be stale: power cycling of target, reset, code executing on the target, etc. The "flash protect_check" command is now gone. This is *always* executed when running a "flash info". As a bonus for more a more robust approach, lots of code could be deleted. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/target')
-rw-r--r--src/target/target.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/target/target.c b/src/target/target.c
index d17bb744..37e515a6 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -474,19 +474,6 @@ int target_resume(struct target *target, int current, uint32_t address, int hand
if ((retval = target->type->resume(target, current, address, handle_breakpoints, debug_execution)) != ERROR_OK)
return retval;
- /* Invalidate any cached protect/erase/... flash status, since
- * almost all targets will now be able modify the flash by
- * themselves. We want flash drivers and infrastructure to
- * be able to rely on (non-invalidated) cached state.
- *
- * For now we require that algorithms provided by OpenOCD are
- * used only by code which properly maintains that cached state.
- * state
- *
- * REVISIT do the same for NAND ; maybe other flash flavors too...
- */
- if (!target->running_alg)
- nor_resume(target);
return retval;
}