summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2011-04-27 23:02:28 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2011-04-27 23:02:28 +0200
commit36d60ee6c8d3aa1865dac2378c481954ba402910 (patch)
tree3abe4b30098b1324b8a0036c98d780c7e084ace3
parent5bd1f0bad4086072f9abffc5c7814511b1456b72 (diff)
downloadopenocd_libswd-36d60ee6c8d3aa1865dac2378c481954ba402910.tar.gz
openocd_libswd-36d60ee6c8d3aa1865dac2378c481954ba402910.tar.bz2
openocd_libswd-36d60ee6c8d3aa1865dac2378c481954ba402910.tar.xz
openocd_libswd-36d60ee6c8d3aa1865dac2378c481954ba402910.zip
cfi: leave check on whether target is running to target_write_memory()
there was a check in clearing the status register that called exit() if the target was running. target_write_memory() has such a check and will report the error correctly. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
-rw-r--r--src/flash/nor/cfi.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c
index 1fa3f2da..954dbc21 100644
--- a/src/flash/nor/cfi.c
+++ b/src/flash/nor/cfi.c
@@ -305,14 +305,6 @@ static int cfi_reset(struct flash_bank *bank)
static void cfi_intel_clear_status_register(struct flash_bank *bank)
{
- struct target *target = bank->target;
-
- if (target->state != TARGET_HALTED)
- {
- LOG_ERROR("BUG: attempted to clear status register while target wasn't halted");
- exit(-1);
- }
-
cfi_send_command(bank, 0x50, flash_address(bank, 0, 0x0));
}