]> git.sur5r.net Git - openocd/commitdiff
cfi: Fix fallback to memory writes
authorEsben Haabendal <esben@haabendal.dk>
Wed, 4 Nov 2015 13:50:40 +0000 (14:50 +0100)
committerPaul Fertser <fercerpav@gmail.com>
Tue, 10 Nov 2015 08:13:15 +0000 (08:13 +0000)
Change-Id: I2d09139b95ff62c62a0b071584e85a87494ed313
Signed-off-by: Esben Haabendal <esben@haabendal.dk>
Reviewed-on: http://openocd.zylin.com/3095
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
src/flash/nor/cfi.c

index 97d3f190c42d26ce39d346a5ccd9a38a6bb0f37d..90d7d83dd22f390e58864187f03e72874276ee6b 100644 (file)
@@ -1213,7 +1213,7 @@ static int cfi_intel_write_block(struct flash_bank *bank, const uint8_t *buffer,
                arm_algo.core_state = ARM_STATE_ARM;
        } else {
                LOG_ERROR("Unknown architecture");
-               return ERROR_FAIL;
+               return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
        }
 
        cfi_intel_clear_status_register(bank);
@@ -1811,7 +1811,7 @@ static int cfi_spansion_write_block(struct flash_bank *bank, const uint8_t *buff
                arm_algo = &armv4_5_algo;
        } else {
                LOG_ERROR("Unknown architecture");
-               return ERROR_FAIL;
+               return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
        }
 
        int target_code_size = 0;