]> git.sur5r.net Git - openocd/commitdiff
cfi: leave check on whether target is running to target_write_memory()
authorØyvind Harboe <oyvind.harboe@zylin.com>
Wed, 27 Apr 2011 21:02:28 +0000 (23:02 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Wed, 27 Apr 2011 21:02:28 +0000 (23:02 +0200)
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>
src/flash/nor/cfi.c

index 1fa3f2da602a7512e21a4ac3ab7503af98b5f6a1..954dbc21711746a4cd5a839d261110404edd6715 100644 (file)
@@ -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));
 }