From 39dbb516a4489c6a934669876774ebc711a0b781 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Harboe?= Date: Tue, 14 Dec 2010 09:29:26 +0100 Subject: [PATCH] flash: clarify protect documentation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit some chips unprotect more than the range asked for. The protect fn, must unprotect/protect minimally the range given. Signed-off-by: Øyvind Harboe --- src/flash/nor/driver.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/flash/nor/driver.h b/src/flash/nor/driver.h index 3757442fcc..cbf9c5282a 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. -- 2.30.2