arm720t: use register_commands()
authorZachary T Welch <zw@superlucidity.net>
Mon, 23 Nov 2009 15:43:05 +0000 (07:43 -0800)
committerZachary T Welch <zw@superlucidity.net>
Wed, 25 Nov 2009 05:37:35 +0000 (21:37 -0800)
src/target/arm720t.c

index 4ca80e1941fa5c0d24db35de1488c3e5be2e598d..52a311c420c6391cc2469a1bf15a7034632fabb3 100644 (file)
@@ -491,23 +491,31 @@ 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 = COMMAND_REGISTER(cmd_ctx, NULL, "arm720t",
-                       NULL, COMMAND_ANY,
-                       "arm720t specific commands");
+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
+};
 
-       COMMAND_REGISTER(cmd_ctx, arm720t_cmd, "cp15",
-                       arm720t_handle_cp15_command, COMMAND_EXEC,
-                       "display/modify cp15 register <opcode> [value]");
+static const struct command_registration arm720t_command_handlers[] = {
+       {
+               .name = "arm720t",
+               .mode = COMMAND_ANY,
+               .help = "arm720t command group",
+               .chain = arm720t_exec_command_handlers,
+       },
+       COMMAND_REGISTRATION_DONE
+};
 
-       return ERROR_OK;
+static int arm720t_register_commands(struct command_context *cmd_ctx)
+{
+       arm7_9_register_commands(cmd_ctx);
+       return register_commands(cmd_ctx, NULL, arm720t_command_handlers);
 }
 
 /** Holds methods for ARM720 targets. */

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)