From: OpenOCD-Gerrit <ope...@us...> - 2015-03-25 20:48:57
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 082170292b5592289a5deaab97887ff8cf7c1b49 (commit) from 6819468a78ce9f0835a9063d93bc839f3d55eb84 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 082170292b5592289a5deaab97887ff8cf7c1b49 Author: Paul Fertser <fer...@gm...> Date: Tue Mar 10 22:22:36 2015 +0300 flash/nor/kinetis: do not attempt mass-erase in place of a bank erase Many kinetis parts come in multi-bank configuration, so this optimisation here can't be performed safely. Investigated and fixed by Richard Braun. Change-Id: I2b56614b47951595c403a1a8edd3afe11b85679b Signed-off-by: Paul Fertser <fer...@gm...> Reviewed-on: http://openocd.zylin.com/2594 Tested-by: jenkins Reviewed-by: Spencer Oliver <sp...@sp...> diff --git a/src/flash/nor/kinetis.c b/src/flash/nor/kinetis.c index a392a17..396fe42 100644 --- a/src/flash/nor/kinetis.c +++ b/src/flash/nor/kinetis.c @@ -797,20 +797,6 @@ static int kinetis_ftfx_command(struct flash_bank *bank, uint8_t fcmd, uint32_t return ERROR_OK; } -static int kinetis_mass_erase(struct flash_bank *bank) -{ - uint8_t ftfx_fstat; - - if (bank->target->state != TARGET_HALTED) { - LOG_ERROR("Target not halted"); - return ERROR_TARGET_NOT_HALTED; - } - - LOG_INFO("Execute Erase All Blocks"); - return kinetis_ftfx_command(bank, FTFx_CMD_MASSERASE, 0, - 0, 0, 0, 0, 0, 0, 0, 0, &ftfx_fstat); -} - COMMAND_HANDLER(kinetis_securing_test) { int result; @@ -845,9 +831,6 @@ static int kinetis_erase(struct flash_bank *bank, int first, int last) if ((first > bank->num_sectors) || (last > bank->num_sectors)) return ERROR_FLASH_OPERATION_FAILED; - if ((first == 0) && (last == (bank->num_sectors - 1))) - return kinetis_mass_erase(bank); - /* * FIXME: TODO: use the 'Erase Flash Block' command if the * requested erase is PFlash or NVM and encompasses the entire ----------------------------------------------------------------------- Summary of changes: src/flash/nor/kinetis.c | 17 ----------------- 1 files changed, 0 insertions(+), 17 deletions(-) hooks/post-receive -- Main OpenOCD repository |