summaryrefslogtreecommitdiff
path: root/src/flash/cfi.c
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-31 09:38:20 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-31 09:38:20 +0000
commitfbe8cf72a5e6c80fed5fba8754d790ca63ad2b65 (patch)
treeb700b797a4a505e7926703e85724b1477712e5d4 /src/flash/cfi.c
parent95e13054cafeeb13163d85822e4202e12007e1a7 (diff)
downloadopenocd+libswd-fbe8cf72a5e6c80fed5fba8754d790ca63ad2b65.tar.gz
openocd+libswd-fbe8cf72a5e6c80fed5fba8754d790ca63ad2b65.tar.bz2
openocd+libswd-fbe8cf72a5e6c80fed5fba8754d790ca63ad2b65.tar.xz
openocd+libswd-fbe8cf72a5e6c80fed5fba8754d790ca63ad2b65.zip
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
Diffstat (limited to 'src/flash/cfi.c')
-rw-r--r--src/flash/cfi.c4
1 files changed, 2 insertions, 2 deletions
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);