flash/nor: fix doc/help and range test for flash protect
Commit 77a1c01ccb introduced infrastructure
for utilizing protection blocks of different size than erase sector.
Parts of doc/help kept reading 'sector' instead of 'protection block'.
flash_driver_protect() parameter range testing did not switched
to bank->num_prot_blocks.
This change fixes it.
Change-Id: Iec301761190a1a1bcc4cb005a519b9e5e4fede51
Reported-by: Mark Odell <mark@odell.ws>
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/3917
Tested-by: jenkins
Reviewed-by: Mark Odell <mrfirmware@gmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
This commit is contained in:
committed by
Paul Fertser
parent
390c9aca1f
commit
93bc4ec40f
+4
-3
@@ -936,10 +936,11 @@ static const struct command_registration flash_exec_command_handlers[] = {
|
||||
.name = "protect",
|
||||
.handler = handle_flash_protect_command,
|
||||
.mode = COMMAND_EXEC,
|
||||
.usage = "bank_id first_sector [last_sector|'last'] "
|
||||
.usage = "bank_id first_block [last_block|'last'] "
|
||||
"('on'|'off')",
|
||||
.help = "Turn protection on or off for a range of sectors "
|
||||
"in a given flash bank.",
|
||||
.help = "Turn protection on or off for a range of protection "
|
||||
"blocks or sectors in a given flash bank. "
|
||||
"See 'flash info' output for a list of blocks.",
|
||||
},
|
||||
{
|
||||
.name = "padded_value",
|
||||
|
||||
Reference in New Issue
Block a user