summaryrefslogtreecommitdiff
path: root/src/flash/nor/core.c
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-05-05 09:32:43 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-05-05 15:24:25 +0200
commitf7e0f3c285e9b1578184da886792e02d253ea687 (patch)
treea7493d82be3551a20fa1664cdd5639880006c647 /src/flash/nor/core.c
parent3077f5845f197c5e21fc4ed917722297c74ef754 (diff)
downloadopenocd+libswd-f7e0f3c285e9b1578184da886792e02d253ea687.tar.gz
openocd+libswd-f7e0f3c285e9b1578184da886792e02d253ea687.tar.bz2
openocd+libswd-f7e0f3c285e9b1578184da886792e02d253ea687.tar.xz
openocd+libswd-f7e0f3c285e9b1578184da886792e02d253ea687.zip
flash: erase_address now has an unlock option
Quite useful to be able to unlock the flash, just like in the flash write_image cmd. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/flash/nor/core.c')
-rw-r--r--src/flash/nor/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c
index 232d5037..e07ca1f6 100644
--- a/src/flash/nor/core.c
+++ b/src/flash/nor/core.c
@@ -502,7 +502,7 @@ static int flash_driver_unprotect(struct flash_bank *bank, int first, int last)
return flash_driver_protect(bank, 0, first, last);
}
-static int flash_unlock_address_range(struct target *target, uint32_t addr, uint32_t length)
+int flash_unlock_address_range(struct target *target, uint32_t addr, uint32_t length)
{
/* By default, pad to sector boundaries ... the real issue here
* is that our (only) caller *permanently* removes protection,