summaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
authorMichael Schwingen <michael@schwingen.org>2011-01-02 21:01:20 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2011-01-02 21:15:27 +0100
commit09a0a69c09022258a00b3971fe708067d9977402 (patch)
tree1582833c3e69562d7576eb346fc6c63532d36dc9 /src/flash
parentd8ece229f9f06e66ad994ca996148912dc0b76b5 (diff)
downloadopenocd_libswd-09a0a69c09022258a00b3971fe708067d9977402.tar.gz
openocd_libswd-09a0a69c09022258a00b3971fe708067d9977402.tar.bz2
openocd_libswd-09a0a69c09022258a00b3971fe708067d9977402.tar.xz
openocd_libswd-09a0a69c09022258a00b3971fe708067d9977402.zip
cfi_protect is not implemented on Spansion flashes (many do not even have protection bits). Demote from error to warning, so that common board code can use "flash write_image erase unlock" regardless of the flash type.
Signed-off-by: Michael Schwingen <michael@schwingen.org>
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/nor/cfi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c
index 5a35aaef..f25f46d9 100644
--- a/src/flash/nor/cfi.c
+++ b/src/flash/nor/cfi.c
@@ -1163,8 +1163,8 @@ static int cfi_protect(struct flash_bank *bank, int set, int first, int last)
return cfi_intel_protect(bank, set, first, last);
break;
default:
- LOG_ERROR("protect: cfi primary command set %i unsupported", cfi_info->pri_id);
- return ERROR_FAIL;
+ LOG_WARNING("protect: cfi primary command set %i unsupported", cfi_info->pri_id);
+ return ERROR_OK;
}
}