projects
/
fw
/
openocd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use COMMAND_REGISTER macro
[fw/openocd]
/
src
/
target
/
arm966e.c
diff --git
a/src/target/arm966e.c
b/src/target/arm966e.c
index 3b85a5cd8689e71d32f9d3889b64a99b4a1c8b1a..f61787580ba3c56a409579d9dc83e5b32aecf118 100644
(file)
--- a/
src/target/arm966e.c
+++ b/
src/target/arm966e.c
@@
-34,10
+34,10
@@
int arm966e_init_arch_info(struct target *target, struct arm966e_common *arm966e, struct jtag_tap *tap)
{
int arm966e_init_arch_info(struct target *target, struct arm966e_common *arm966e, struct jtag_tap *tap)
{
- struct arm9tdmi_common *arm9tdmi = &arm966e->arm9tdmi_common;
- struct arm7_9_common *arm7_9 = &arm9tdmi->arm7_9_common;
+ struct arm7_9_common *arm7_9 = &arm966e->arm7_9_common;
- arm9tdmi_init_arch_info(target, arm9tdmi, tap);
+ /* initialize arm7/arm9 specific info (including armv4_5) */
+ arm9tdmi_init_arch_info(target, arm7_9, tap);
arm966e->common_magic = ARM966E_COMMON_MAGIC;
arm966e->common_magic = ARM966E_COMMON_MAGIC;
@@
-165,31
+165,31
@@
int arm966e_write_cp15(struct target *target, int reg_addr, uint32_t value)
COMMAND_HANDLER(arm966e_handle_cp15_command)
{
int retval;
COMMAND_HANDLER(arm966e_handle_cp15_command)
{
int retval;
- struct target *target = get_current_target(
cmd_ctx
);
+ struct target *target = get_current_target(
CMD_CTX
);
struct arm966e_common *arm966e = target_to_arm966(target);
struct arm966e_common *arm966e = target_to_arm966(target);
- retval = arm966e_verify_pointer(
cmd_ctx
, arm966e);
+ retval = arm966e_verify_pointer(
CMD_CTX
, arm966e);
if (retval != ERROR_OK)
return retval;
if (target->state != TARGET_HALTED)
{
if (retval != ERROR_OK)
return retval;
if (target->state != TARGET_HALTED)
{
- command_print(
cmd_ctx
, "target must be stopped for \"%s\" command", CMD_NAME);
+ command_print(
CMD_CTX
, "target must be stopped for \"%s\" command", CMD_NAME);
return ERROR_OK;
}
/* one or more argument, access a single register (write if second argument is given */
return ERROR_OK;
}
/* one or more argument, access a single register (write if second argument is given */
- if (
argc
>= 1)
+ if (
CMD_ARGC
>= 1)
{
uint32_t address;
{
uint32_t address;
- COMMAND_PARSE_NUMBER(u32,
args
[0], address);
+ COMMAND_PARSE_NUMBER(u32,
CMD_ARGV
[0], address);
- if (
argc
== 1)
+ if (
CMD_ARGC
== 1)
{
uint32_t value;
if ((retval = arm966e_read_cp15(target, address, &value)) != ERROR_OK)
{
{
uint32_t value;
if ((retval = arm966e_read_cp15(target, address, &value)) != ERROR_OK)
{
- command_print(
cmd_ctx
,
+ command_print(
CMD_CTX
,
"couldn't access reg %" PRIi32,
address);
return ERROR_OK;
"couldn't access reg %" PRIi32,
address);
return ERROR_OK;
@@
-199,21
+199,21
@@
COMMAND_HANDLER(arm966e_handle_cp15_command)
return retval;
}
return retval;
}
- command_print(
cmd_ctx
, "%" PRIi32 ": %8.8" PRIx32,
+ command_print(
CMD_CTX
, "%" PRIi32 ": %8.8" PRIx32,
address, value);
}
address, value);
}
- else if (
argc
== 2)
+ else if (
CMD_ARGC
== 2)
{
uint32_t value;
{
uint32_t value;
- COMMAND_PARSE_NUMBER(u32,
args
[1], value);
+ COMMAND_PARSE_NUMBER(u32,
CMD_ARGV
[1], value);
if ((retval = arm966e_write_cp15(target, address, value)) != ERROR_OK)
{
if ((retval = arm966e_write_cp15(target, address, value)) != ERROR_OK)
{
- command_print(
cmd_ctx
,
+ command_print(
CMD_CTX
,
"couldn't access reg %" PRIi32,
address);
return ERROR_OK;
}
"couldn't access reg %" PRIi32,
address);
return ERROR_OK;
}
- command_print(
cmd_ctx
, "%" PRIi32 ": %8.8" PRIx32,
+ command_print(
CMD_CTX
, "%" PRIi32 ": %8.8" PRIx32,
address, value);
}
}
address, value);
}
}
@@
-228,10
+228,10
@@
int arm966e_register_commands(struct command_context *cmd_ctx)
struct command *arm966e_cmd;
retval = arm9tdmi_register_commands(cmd_ctx);
struct command *arm966e_cmd;
retval = arm9tdmi_register_commands(cmd_ctx);
- arm966e_cmd =
register_command
(cmd_ctx, NULL, "arm966e",
+ arm966e_cmd =
COMMAND_REGISTER
(cmd_ctx, NULL, "arm966e",
NULL, COMMAND_ANY,
"arm966e specific commands");
NULL, COMMAND_ANY,
"arm966e specific commands");
-
register_command
(cmd_ctx, arm966e_cmd, "cp15",
+
COMMAND_REGISTER
(cmd_ctx, arm966e_cmd, "cp15",
arm966e_handle_cp15_command, COMMAND_EXEC,
"display/modify cp15 register <num> [value]");
arm966e_handle_cp15_command, COMMAND_EXEC,
"display/modify cp15 register <num> [value]");