summaryrefslogtreecommitdiff
path: root/src/flash/nor
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-12-14 09:29:26 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-12-15 09:48:37 +0100
commit39dbb516a4489c6a934669876774ebc711a0b781 (patch)
tree72a321c62bcb5abfbdc1c6f54fe00d60916ac036 /src/flash/nor
parentcbf48bed6a26279900ad00e6d6462a7f29676175 (diff)
downloadopenocd_libswd-39dbb516a4489c6a934669876774ebc711a0b781.tar.gz
openocd_libswd-39dbb516a4489c6a934669876774ebc711a0b781.tar.bz2
openocd_libswd-39dbb516a4489c6a934669876774ebc711a0b781.tar.xz
openocd_libswd-39dbb516a4489c6a934669876774ebc711a0b781.zip
flash: clarify protect documentation
some chips unprotect more than the range asked for. The protect fn, must unprotect/protect minimally the range given. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/flash/nor')
-rw-r--r--src/flash/nor/driver.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/flash/nor/driver.h b/src/flash/nor/driver.h
index 3757442f..cbf9c528 100644
--- a/src/flash/nor/driver.h
+++ b/src/flash/nor/driver.h
@@ -105,9 +105,12 @@ struct flash_driver
/**
* Bank/sector protection routine (target-specific).
- * When called, the driver should disable 'flash write' bits (or
- * enable 'erase protection' bits) for the given @a bank and @a
- * sectors.
+ *
+ * When called, the driver should enable/disable protection
+ * for MINIMUM the range covered by first..last sectors
+ * inclusive. Some chips have alignment requirements will
+ * cause the actual range to be protected / unprotected to
+ * be larger than the first..last range.
*
* @param bank The bank to protect or unprotect.
* @param set If non-zero, enable protection; if 0, disable it.