ARM11: fix dbgtap JTAG_DEBUG
[openocd.git] / src / target / arm720t.c
index ac7e4888832bb9ea3ccceb1f34c8055662ebb4e9..bae2561aea1679e3feecd689422f9ef040add7e8 100644 (file)
@@ -225,7 +225,7 @@ static int arm720t_verify_pointer(struct command_context *cmd_ctx,
 static int arm720t_arch_state(struct target *target)
 {
        struct arm720t_common *arm720t = target_to_arm720(target);
-       struct armv4_5_common_s *armv4_5;
+       struct arm *armv4_5;
 
        static const char *state[] =
        {
@@ -307,7 +307,7 @@ static int arm720t_soft_reset_halt(struct target *target)
        struct arm720t_common *arm720t = target_to_arm720(target);
        struct reg *dbg_stat = &arm720t->arm7_9_common
                        .eice_cache->reg_list[EICE_DBG_STAT];
-       struct armv4_5_common_s *armv4_5 = &arm720t->arm7_9_common
+       struct arm *armv4_5 = &arm720t->arm7_9_common
                        .armv4_5_common;
 
        if ((retval = target_halt(target)) != ERROR_OK)
@@ -354,7 +354,6 @@ static int arm720t_soft_reset_halt(struct target *target)
        cpsr |= 0xd3;
        arm_set_cpsr(armv4_5, cpsr);
        armv4_5->cpsr->dirty = 1;
-       armv4_5->core_state = ARMV4_5_STATE_ARM;
 
        /* start fetching from 0x0 */
        buf_set_u32(armv4_5->core_cache->reg_list[15].value, 0, 32, 0x0);
@@ -492,24 +491,29 @@ static int arm720t_mcr(struct target *target, int cpnum, uint32_t op1, uint32_t
        return arm720t_write_cp15(target, mrc_opcode(cpnum, op1, op2, CRn, CRm), value);
 }
 
-static int arm720t_register_commands(struct command_context *cmd_ctx)
-{
-       int retval;
-       struct command *arm720t_cmd;
-
-
-       retval = arm7_9_register_commands(cmd_ctx);
-
-       arm720t_cmd = register_command(cmd_ctx, NULL, "arm720t",
-                       NULL, COMMAND_ANY,
-                       "arm720t specific commands");
-
-       register_command(cmd_ctx, arm720t_cmd, "cp15",
-                       arm720t_handle_cp15_command, COMMAND_EXEC,
-                       "display/modify cp15 register <opcode> [value]");
+static const struct command_registration arm720t_exec_command_handlers[] = {
+       {
+               .name = "cp15",
+               .handler = arm720t_handle_cp15_command,
+               .mode = COMMAND_EXEC,
+               .usage = "<opcode> [value]",
+               .help = "display/modify cp15 register",
+       },
+       COMMAND_REGISTRATION_DONE
+};
 
-       return ERROR_OK;
-}
+static const struct command_registration arm720t_command_handlers[] = {
+       {
+               .chain = arm7_9_command_handlers,
+       },
+       {
+               .name = "arm720t",
+               .mode = COMMAND_ANY,
+               .help = "arm720t command group",
+               .chain = arm720t_exec_command_handlers,
+       },
+       COMMAND_REGISTRATION_DONE
+};
 
 /** Holds methods for ARM720 targets. */
 struct target_type arm720t_target =
@@ -548,7 +552,7 @@ struct target_type arm720t_target =
        .add_watchpoint = arm7_9_add_watchpoint,
        .remove_watchpoint = arm7_9_remove_watchpoint,
 
-       .register_commands = arm720t_register_commands,
+       .commands = arm720t_command_handlers,
        .target_create = arm720t_target_create,
        .init_target = arm720t_init_target,
        .examine = arm7_9_examine,

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)