Minor bug fixes in Mips32 code

Now the the "Fast" version for memory blank check in pic32mx.c can be called:
default_flash_blank_check()  instead of the "fallback"  default_flash_mem_blank_check().

The command "verify_image", without working area, now don't show:
 checksum mismatch - attempting binary compare
when there are no real errors in flash.

Change-Id: I256e8ae949289634e1de5c1c2861e4c4c4b7fdce
Signed-off-by: Salvador <sarroyofdez@yahoo.es>
Reviewed-on: http://openocd.zylin.com/549
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
__archive__
Salvador 2012-04-02 16:48:52 +02:00 committed by Spencer Oliver
parent a6cf60c9c2
commit 18e6e02cdc
1 changed files with 3 additions and 3 deletions

View File

@ -631,7 +631,7 @@ int mips32_checksum_memory(struct target *target, uint32_t address,
destroy_reg_param(&reg_params[0]); destroy_reg_param(&reg_params[0]);
destroy_reg_param(&reg_params[1]); destroy_reg_param(&reg_params[1]);
target_free_working_area(target, crc_algorithm); target_free_working_area(target, crc_algorithm);
return 0; return retval;
} }
*checksum = buf_get_u32(reg_params[0].value, 0, 32); *checksum = buf_get_u32(reg_params[0].value, 0, 32);
@ -688,14 +688,14 @@ int mips32_blank_check_memory(struct target *target,
retval = target_run_algorithm(target, 0, NULL, 3, reg_params, retval = target_run_algorithm(target, 0, NULL, 3, reg_params,
erase_check_algorithm->address, erase_check_algorithm->address,
erase_check_algorithm->address + (sizeof(erase_check_code)-2), erase_check_algorithm->address + (sizeof(erase_check_code)-4),
10000, &mips32_info); 10000, &mips32_info);
if (retval != ERROR_OK) { if (retval != ERROR_OK) {
destroy_reg_param(&reg_params[0]); destroy_reg_param(&reg_params[0]);
destroy_reg_param(&reg_params[1]); destroy_reg_param(&reg_params[1]);
destroy_reg_param(&reg_params[2]); destroy_reg_param(&reg_params[2]);
target_free_working_area(target, erase_check_algorithm); target_free_working_area(target, erase_check_algorithm);
return 0; return retval;
} }
*blank = buf_get_u32(reg_params[2].value, 0, 32); *blank = buf_get_u32(reg_params[2].value, 0, 32);