X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fkinetis.c;h=396fe42a9c8f3c709993ed7e72cd8869329f3082;hp=a392a17ba30df713abedd9d5cca5a03d9e510066;hb=03b72c367c327b4e0510fa65c9664fd62d3ca6af;hpb=08da1b4258a971a068401849c65b9d40f08ee44c diff --git a/src/flash/nor/kinetis.c b/src/flash/nor/kinetis.c index a392a17ba3..396fe42a9c 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