From fbe8cf72a5e6c80fed5fba8754d790ca63ad2b65 Mon Sep 17 00:00:00 2001 From: zwelch Date: Sun, 31 May 2009 09:38:20 +0000 Subject: Add target_run_algorithm wrapper: - replaces all calls to target->type->run_algorithm. - add documentation in target_s to warn not to invoke callback directly. git-svn-id: svn://svn.berlios.de/openocd/trunk@1961 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/flash/cfi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/flash/cfi.c') diff --git a/src/flash/cfi.c b/src/flash/cfi.c index ba6c7a80..432c8cc4 100644 --- a/src/flash/cfi.c +++ b/src/flash/cfi.c @@ -1227,7 +1227,7 @@ static int cfi_intel_write_block(struct flash_bank_s *bank, u8 *buffer, u32 addr LOG_INFO("Write 0x%04x bytes to flash at 0x%08x", thisrun_count, address ); /* Execute algorithm, assume breakpoint for last instruction */ - retval = target->type->run_algorithm(target, 0, NULL, 7, reg_params, + retval = target_run_algorithm(target, 0, NULL, 7, reg_params, cfi_info->write_algorithm->address, cfi_info->write_algorithm->address + target_code_size - sizeof(u32), 10000, /* 10s should be enough for max. 32k of data */ @@ -1510,7 +1510,7 @@ static int cfi_spansion_write_block(struct flash_bank_s *bank, u8 *buffer, u32 a buf_set_u32(reg_params[8].value, 0, 32, flash_address(bank, 0, pri_ext->_unlock2)); buf_set_u32(reg_params[9].value, 0, 32, 0x55555555); - retval = target->type->run_algorithm(target, 0, NULL, 10, reg_params, + retval = target_run_algorithm(target, 0, NULL, 10, reg_params, cfi_info->write_algorithm->address, cfi_info->write_algorithm->address + ((24 * 4) - 4), 10000, &armv4_5_info); -- cgit v1.2.3