diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-13 08:39:42 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-13 11:58:09 -0800 |
commit | b1de5eb9a074b362e953e857c42cac9a9b18b2a3 (patch) | |
tree | 96d3ffb07523e97824d4b5605999ed43f87f1cc5 /src/target | |
parent | 6c965a3da9cd6f5b2cf1b177d38723356c83d923 (diff) | |
download | riscv-openocd-b1de5eb9a074b362e953e857c42cac9a9b18b2a3.zip riscv-openocd-b1de5eb9a074b362e953e857c42cac9a9b18b2a3.tar.gz riscv-openocd-b1de5eb9a074b362e953e857c42cac9a9b18b2a3.tar.bz2 |
reg_param_t -> struct reg_param
Remove misleading typedef and redundant suffix from struct reg_param.
Diffstat (limited to 'src/target')
-rw-r--r-- | src/target/algorithm.c | 4 | ||||
-rw-r--r-- | src/target/algorithm.h | 8 | ||||
-rw-r--r-- | src/target/arm11.c | 2 | ||||
-rw-r--r-- | src/target/arm7_9_common.c | 8 | ||||
-rw-r--r-- | src/target/arm7_9_common.h | 2 | ||||
-rw-r--r-- | src/target/armv4_5.c | 4 | ||||
-rw-r--r-- | src/target/armv4_5.h | 2 | ||||
-rw-r--r-- | src/target/armv7m.c | 6 | ||||
-rw-r--r-- | src/target/armv7m.h | 2 | ||||
-rw-r--r-- | src/target/mips32.c | 2 | ||||
-rw-r--r-- | src/target/mips32.h | 2 | ||||
-rw-r--r-- | src/target/target.c | 4 | ||||
-rw-r--r-- | src/target/target.h | 2 | ||||
-rw-r--r-- | src/target/target_type.h | 4 |
14 files changed, 26 insertions, 26 deletions
diff --git a/src/target/algorithm.c b/src/target/algorithm.c index 6d213e0..7643e3c 100644 --- a/src/target/algorithm.c +++ b/src/target/algorithm.c @@ -39,7 +39,7 @@ void destroy_mem_param(struct mem_param *param) param->value = NULL; } -void init_reg_param(reg_param_t *param, char *reg_name, uint32_t size, enum param_direction direction) +void init_reg_param(struct reg_param *param, char *reg_name, uint32_t size, enum param_direction direction) { param->reg_name = reg_name; param->size = size; @@ -47,7 +47,7 @@ void init_reg_param(reg_param_t *param, char *reg_name, uint32_t size, enum para param->direction = direction; } -void destroy_reg_param(reg_param_t *param) +void destroy_reg_param(struct reg_param *param) { free(param->value); param->value = NULL; diff --git a/src/target/algorithm.h b/src/target/algorithm.h index 963d1a5..80f081d 100644 --- a/src/target/algorithm.h +++ b/src/target/algorithm.h @@ -37,20 +37,20 @@ struct mem_param enum param_direction direction; }; -typedef struct reg_param_s +struct reg_param { char *reg_name; uint32_t size; uint8_t *value; enum param_direction direction; -} reg_param_t; +}; void init_mem_param(struct mem_param *param, uint32_t address, uint32_t size, enum param_direction dir); void destroy_mem_param(struct mem_param *param); -void init_reg_param(reg_param_t *param, +void init_reg_param(struct reg_param *param, char *reg_name, uint32_t size, enum param_direction dir); -void destroy_reg_param(reg_param_t *param); +void destroy_reg_param(struct reg_param *param); #endif /* ALGORITHM_H */ diff --git a/src/target/arm11.c b/src/target/arm11.c index d7fca7d..2787eca 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -1615,7 +1615,7 @@ static int arm11_remove_watchpoint(struct target_s *target, /* target algorithm support */ static int arm11_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, - int num_reg_params, reg_param_t *reg_params, + int num_reg_params, struct reg_param *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) { diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 66b13df..0289d3c 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -2654,7 +2654,7 @@ static const uint32_t dcc_code[] = 0xeafffff9 /* b w */ }; -int armv4_5_run_algorithm_inner(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info, int (*run_it)(struct target_s *target, uint32_t exit_point, int timeout_ms, void *arch_info)); +int armv4_5_run_algorithm_inner(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info, int (*run_it)(struct target_s *target, uint32_t exit_point, int timeout_ms, void *arch_info)); int arm7_9_bulk_write_memory(target_t *target, uint32_t address, uint32_t count, uint8_t *buffer) { @@ -2691,7 +2691,7 @@ int arm7_9_bulk_write_memory(target_t *target, uint32_t address, uint32_t count, } armv4_5_algorithm_t armv4_5_info; - reg_param_t reg_params[1]; + struct reg_param reg_params[1]; armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC; armv4_5_info.core_mode = ARMV4_5_MODE_SVC; @@ -2725,7 +2725,7 @@ int arm7_9_checksum_memory(struct target_s *target, uint32_t address, uint32_t c { working_area_t *crc_algorithm; armv4_5_algorithm_t armv4_5_info; - reg_param_t reg_params[2]; + struct reg_param reg_params[2]; int retval; static const uint32_t arm7_9_crc_code[] = { @@ -2808,7 +2808,7 @@ int arm7_9_checksum_memory(struct target_s *target, uint32_t address, uint32_t c int arm7_9_blank_check_memory(struct target_s *target, uint32_t address, uint32_t count, uint32_t* blank) { working_area_t *erase_check_algorithm; - reg_param_t reg_params[3]; + struct reg_param reg_params[3]; armv4_5_algorithm_t armv4_5_info; int retval; uint32_t i; diff --git a/src/target/arm7_9_common.h b/src/target/arm7_9_common.h index 1a9e173..8a6dce4 100644 --- a/src/target/arm7_9_common.h +++ b/src/target/arm7_9_common.h @@ -141,7 +141,7 @@ int arm7_9_bulk_write_memory(target_t *target, uint32_t address, uint32_t count, int arm7_9_checksum_memory(struct target_s *target, uint32_t address, uint32_t count, uint32_t* checksum); int arm7_9_blank_check_memory(struct target_s *target, uint32_t address, uint32_t count, uint32_t* blank); -int arm7_9_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_prams, reg_param_t *reg_param, uint32_t entry_point, void *arch_info); +int arm7_9_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_prams, struct reg_param *reg_param, uint32_t entry_point, void *arch_info); int arm7_9_add_breakpoint(struct target_s *target, breakpoint_t *breakpoint); int arm7_9_remove_breakpoint(struct target_s *target, breakpoint_t *breakpoint); diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index 12509aa..0dd047d 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -543,7 +543,7 @@ static int armv4_5_run_algorithm_completion(struct target_s *target, uint32_t ex return ERROR_OK; } -int armv4_5_run_algorithm_inner(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info, int (*run_it)(struct target_s *target, uint32_t exit_point, int timeout_ms, void *arch_info)) +int armv4_5_run_algorithm_inner(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info, int (*run_it)(struct target_s *target, uint32_t exit_point, int timeout_ms, void *arch_info)) { struct armv4_5_common_s *armv4_5 = target_to_armv4_5(target); armv4_5_algorithm_t *armv4_5_algorithm_info = arch_info; @@ -708,7 +708,7 @@ int armv4_5_run_algorithm_inner(struct target_s *target, int num_mem_params, str return retval; } -int armv4_5_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) +int armv4_5_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) { return armv4_5_run_algorithm_inner(target, num_mem_params, mem_params, num_reg_params, reg_params, entry_point, exit_point, timeout_ms, arch_info, armv4_5_run_algorithm_completion); } diff --git a/src/target/armv4_5.h b/src/target/armv4_5.h index e908d54..c6686f1 100644 --- a/src/target/armv4_5.h +++ b/src/target/armv4_5.h @@ -184,7 +184,7 @@ int armv4_5_init_arch_info(target_t *target, armv4_5_common_t *armv4_5); int armv4_5_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, - int num_reg_params, reg_param_t *reg_params, + int num_reg_params, struct reg_param *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); diff --git a/src/target/armv7m.c b/src/target/armv7m.c index 36f828b..0e3c8a9 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -358,7 +358,7 @@ static int armv7m_run_and_wait(struct target_s *target, uint32_t entry_point, in /** Runs a Thumb algorithm in the target. */ int armv7m_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, - int num_reg_params, reg_param_t *reg_params, + int num_reg_params, struct reg_param *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) { @@ -590,7 +590,7 @@ int armv7m_checksum_memory(struct target_s *target, { working_area_t *crc_algorithm; armv7m_algorithm_t armv7m_info; - reg_param_t reg_params[2]; + struct reg_param reg_params[2]; int retval; static const uint16_t cortex_m3_crc_code[] = { @@ -672,7 +672,7 @@ int armv7m_blank_check_memory(struct target_s *target, uint32_t address, uint32_t count, uint32_t* blank) { working_area_t *erase_check_algorithm; - reg_param_t reg_params[3]; + struct reg_param reg_params[3]; armv7m_algorithm_t armv7m_info; int retval; uint32_t i; diff --git a/src/target/armv7m.h b/src/target/armv7m.h index 6b51c47..75ba3d9 100644 --- a/src/target/armv7m.h +++ b/src/target/armv7m.h @@ -147,7 +147,7 @@ int armv7m_init_arch_info(target_t *target, armv7m_common_t *armv7m); int armv7m_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, - int num_reg_params, reg_param_t *reg_params, + int num_reg_params, struct reg_param *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); diff --git a/src/target/mips32.c b/src/target/mips32.c index 18bea79..055d278 100644 --- a/src/target/mips32.c +++ b/src/target/mips32.c @@ -336,7 +336,7 @@ int mips32_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -int mips32_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) +int mips32_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) { /*TODO*/ return ERROR_OK; diff --git a/src/target/mips32.h b/src/target/mips32.h index 927c2f1..476b768 100644 --- a/src/target/mips32.h +++ b/src/target/mips32.h @@ -136,7 +136,7 @@ reg_cache_t *mips32_build_reg_cache(target_t *target); int mips32_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, - int num_reg_params, reg_param_t *reg_params, + int num_reg_params, struct reg_param *reg_params, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); diff --git a/src/target/target.c b/src/target/target.c index 44fe6bc..f56fbc4 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -559,7 +559,7 @@ static int target_soft_reset_halt_imp(struct target_s *target) return target->type->soft_reset_halt_imp(target); } -static int target_run_algorithm_imp(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) +static int target_run_algorithm_imp(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) { if (!target_was_examined(target)) { @@ -635,7 +635,7 @@ int target_step(struct target_s *target, int target_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, - int num_reg_params, reg_param_t *reg_param, + int num_reg_params, struct reg_param *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) { diff --git a/src/target/target.h b/src/target/target.h index 691a000..1e5639d 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -361,7 +361,7 @@ int target_step(struct target_s *target, */ int target_run_algorithm(struct target_s *target, int num_mem_params, struct mem_param *mem_params, - int num_reg_params, reg_param_t *reg_param, + int num_reg_params, struct reg_param *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); diff --git a/src/target/target_type.h b/src/target/target_type.h index f8c78e2..ee76ff4 100644 --- a/src/target/target_type.h +++ b/src/target/target_type.h @@ -144,12 +144,12 @@ struct target_type_s int (*remove_watchpoint)(struct target_s *target, watchpoint_t *watchpoint); /* target algorithm support */ - int (*run_algorithm_imp)(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); + int (*run_algorithm_imp)(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); /** * Target algorithm support. Do @b not call this method directly, * use target_run_algorithm() instead. */ - int (*run_algorithm)(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, reg_param_t *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); + int (*run_algorithm)(struct target_s *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info); int (*register_commands)(struct command_context_s *cmd_ctx); |