X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Farm7tdmi.c;h=7d14ed61490dc00bee00849f1f36f5f7027ee2e3;hb=b715a81f5b95144118d8f946d4191f1dc844783a;hp=8be8a125e475868c85c7515e36d4f8fae1caf07e;hpb=aafb916bea1153b8d2f4706e4a62628f49741133;p=openocd.git diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c index 8be8a125e4..7d14ed6149 100644 --- a/src/target/arm7tdmi.c +++ b/src/target/arm7tdmi.c @@ -29,6 +29,7 @@ #include "arm7tdmi.h" #include "target_type.h" +#include "register.h" /* @@ -580,7 +581,7 @@ static void arm7tdmi_branch_resume(struct target *target) static void arm7tdmi_branch_resume_thumb(struct target *target) { struct arm7_9_common *arm7_9 = target_to_arm7_9(target); - struct armv4_5_common_s *armv4_5 = &arm7_9->armv4_5_common; + struct arm *armv4_5 = &arm7_9->armv4_5_common; struct arm_jtag *jtag_info = &arm7_9->jtag_info; struct reg *dbg_stat = &arm7_9->eice_cache->reg_list[EICE_DBG_STAT]; @@ -640,10 +641,9 @@ static void arm7tdmi_branch_resume_thumb(struct target *target) static void arm7tdmi_build_reg_cache(struct target *target) { struct reg_cache **cache_p = register_get_last_cache_p(&target->reg_cache); - struct armv4_5_common_s *armv4_5 = target_to_armv4_5(target); + struct arm *armv4_5 = target_to_armv4_5(target); (*cache_p) = armv4_5_build_reg_cache(target, armv4_5); - armv4_5->core_cache = (*cache_p); } int arm7tdmi_init_target(struct command_context *cmd_ctx, struct target *target) @@ -653,10 +653,9 @@ int arm7tdmi_init_target(struct command_context *cmd_ctx, struct target *target) return ERROR_OK; } -int arm7tdmi_init_arch_info(struct target *target, struct arm7tdmi_common *arm7tdmi, struct jtag_tap *tap) +int arm7tdmi_init_arch_info(struct target *target, + struct arm7_9_common *arm7_9, struct jtag_tap *tap) { - struct arm7_9_common *arm7_9 = &arm7tdmi->arm7_9_common; - /* prepare JTAG information for the new target */ arm7_9->jtag_info.tap = tap; arm7_9->jtag_info.scann_size = 4; @@ -705,11 +704,11 @@ int arm7tdmi_init_arch_info(struct target *target, struct arm7tdmi_common *arm7t static int arm7tdmi_target_create(struct target *target, Jim_Interp *interp) { - struct arm7tdmi_common *arm7tdmi; + struct arm7_9_common *arm7_9; - arm7tdmi = calloc(1,sizeof(struct arm7tdmi_common)); - arm7tdmi_init_arch_info(target, arm7tdmi, target->tap); - arm7tdmi->arm7_9_common.armv4_5_common.is_armv4 = true; + arm7_9 = calloc(1,sizeof(struct arm7_9_common)); + arm7tdmi_init_arch_info(target, arm7_9, target->tap); + arm7_9->armv4_5_common.is_armv4 = true; return ERROR_OK; } @@ -737,8 +736,9 @@ struct target_type arm7tdmi_target = .read_memory = arm7_9_read_memory, .write_memory = arm7_9_write_memory, .bulk_write_memory = arm7_9_bulk_write_memory, - .checksum_memory = arm7_9_checksum_memory, - .blank_check_memory = arm7_9_blank_check_memory, + + .checksum_memory = arm_checksum_memory, + .blank_check_memory = arm_blank_check_memory, .run_algorithm = armv4_5_run_algorithm, @@ -747,7 +747,7 @@ struct target_type arm7tdmi_target = .add_watchpoint = arm7_9_add_watchpoint, .remove_watchpoint = arm7_9_remove_watchpoint, - .register_commands = arm7_9_register_commands, + .commands = arm7_9_command_handlers, .target_create = arm7tdmi_target_create, .init_target = arm7tdmi_init_target, .examine = arm7_9_examine,