summaryrefslogtreecommitdiff
path: root/src/target/arm11.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-12-01 00:48:53 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-12-01 00:48:53 -0800
commit177bbd8891ae737ea7f8c0791a6236f72cedee40 (patch)
treeceeef8ae2d729eb5c3d539249f13f019fa300d7c /src/target/arm11.c
parent209a0197f0c79442a2314199170a957c36c0ddb6 (diff)
downloadopenocd+libswd-177bbd8891ae737ea7f8c0791a6236f72cedee40.tar.gz
openocd+libswd-177bbd8891ae737ea7f8c0791a6236f72cedee40.tar.bz2
openocd+libswd-177bbd8891ae737ea7f8c0791a6236f72cedee40.tar.xz
openocd+libswd-177bbd8891ae737ea7f8c0791a6236f72cedee40.zip
target: "mcr" and "mrc" are ARM-specific
Switch "mrc" and "mcr" commands to be toplevel ARM operations, as they should initially have been. Correct the usage message for both commands: it matches ARM documentation (as one wants!) instead of reordering them to match the funky mrc() and mcr() method usage (sigh). For Cortex-A8: restore a line that got accidentally dropped, so the secure monitor mode shadow registers will show again. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/arm11.c')
-rw-r--r--src/target/arm11.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/target/arm11.c b/src/target/arm11.c
index daba3b84..30dbedb9 100644
--- a/src/target/arm11.c
+++ b/src/target/arm11.c
@@ -1219,6 +1219,13 @@ static int arm11_remove_watchpoint(struct target *target,
return ERROR_FAIL;
}
+static int arm11_mrc(struct target *target, int cpnum,
+ uint32_t op1, uint32_t op2,
+ uint32_t CRn, uint32_t CRm, uint32_t *value);
+static int arm11_mcr(struct target *target, int cpnum,
+ uint32_t op1, uint32_t op2, uint32_t CRn,
+ uint32_t CRm, uint32_t value);
+
static int arm11_target_create(struct target *target, Jim_Interp *interp)
{
struct arm11_common *arm11;
@@ -1238,6 +1245,9 @@ static int arm11_target_create(struct target *target, Jim_Interp *interp)
armv4_5_init_arch_info(target, &arm11->arm);
+ arm11->arm.mrc = arm11_mrc;
+ arm11->arm.mcr = arm11_mcr;
+
arm11->target = target;
arm11->jtag_info.tap = target->tap;
@@ -1679,7 +1689,4 @@ struct target_type arm11_target = {
.target_create = arm11_target_create,
.init_target = arm11_init_target,
.examine = arm11_examine,
-
- .mrc = arm11_mrc,
- .mcr = arm11_mcr,
};