]> git.sur5r.net Git - openocd/blobdiff - src/target/arm9tdmi.c
target: remove unused TARGET_EVENT_OLD_* symbols
[openocd] / src / target / arm9tdmi.c
index a69e49e74b2c105058d90b5489f14e5ff7b92fe5..7eb5641de9297f003c3cc2075135defa6dd57dae 100644 (file)
@@ -664,7 +664,7 @@ static void arm9tdmi_branch_resume_thumb(struct target *target)
        LOG_DEBUG("-");
 
        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];
 
@@ -751,10 +751,9 @@ void arm9tdmi_disable_single_step(struct target *target)
 static void arm9tdmi_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 arm9tdmi_init_target(struct command_context *cmd_ctx,
@@ -909,21 +908,27 @@ COMMAND_HANDLER(handle_arm9tdmi_catch_vectors_command)
        return ERROR_OK;
 }
 
-int arm9tdmi_register_commands(struct command_context *cmd_ctx)
-{
-       int retval;
-       struct command *arm9tdmi_cmd;
-
-       retval = arm7_9_register_commands(cmd_ctx);
-       arm9tdmi_cmd = register_command(cmd_ctx, NULL, "arm9",
-                       NULL, COMMAND_ANY,
-                       "arm9 specific commands");
-       register_command(cmd_ctx, arm9tdmi_cmd, "vector_catch",
-                       handle_arm9tdmi_catch_vectors_command, COMMAND_EXEC,
-                       "arm9 vector_catch [all|none|reset|undef|swi|pabt|dabt|irq|fiq] ...");
-
-       return retval;
-}
+static const struct command_registration arm9tdmi_exec_command_handlers[] = {
+       {
+               .name = "vector_catch",
+               .handler = handle_arm9tdmi_catch_vectors_command,
+               .mode = COMMAND_EXEC,
+               .usage = "[all|none|reset|undef|swi|pabt|dabt|irq|fiq] ...",
+       },
+       COMMAND_REGISTRATION_DONE
+};
+const struct command_registration arm9tdmi_command_handlers[] = {
+       {
+               .chain = arm7_9_command_handlers,
+       },
+       {
+               .name = "arm9tdmi",
+               .mode = COMMAND_ANY,
+               .help = "arm9tdmi command group",
+               .chain = arm9tdmi_exec_command_handlers,
+       },
+       COMMAND_REGISTRATION_DONE
+};
 
 /** Holds methods for ARM9TDMI targets. */
 struct target_type arm9tdmi_target =
@@ -959,7 +964,7 @@ struct target_type arm9tdmi_target =
        .add_watchpoint = arm7_9_add_watchpoint,
        .remove_watchpoint = arm7_9_remove_watchpoint,
 
-       .register_commands = arm9tdmi_register_commands,
+       .commands = arm9tdmi_command_handlers,
        .target_create = arm9tdmi_target_create,
        .init_target = arm9tdmi_init_target,
        .examine = arm7_9_examine,