summaryrefslogtreecommitdiff
path: root/src/target/etb.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-11-11 21:52:02 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-11-11 21:52:02 -0800
commit9855a11eddc38b812203facd7a52a71422b19272 (patch)
tree6ccd624cc263845d8b3acea20e093f691b25d448 /src/target/etb.c
parent3ae44019018b7fa9adbe7dcf49c2b79e8e11acea (diff)
downloadopenocd+libswd-9855a11eddc38b812203facd7a52a71422b19272.tar.gz
openocd+libswd-9855a11eddc38b812203facd7a52a71422b19272.tar.bz2
openocd+libswd-9855a11eddc38b812203facd7a52a71422b19272.tar.xz
openocd+libswd-9855a11eddc38b812203facd7a52a71422b19272.zip
ETM: update port drivers
Make both useful ETM port drivers (etb, etm_dummy) use the new toplevel ETM handle, instead of the to-be-removed lower level one. Do the same for the "oocd-trace" prototype too; and fix its error reporting paths: return failure codes, don't exit(), etc Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/etb.c')
-rw-r--r--src/target/etb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/target/etb.c b/src/target/etb.c
index 41312bed..28ef3ef4 100644
--- a/src/target/etb.c
+++ b/src/target/etb.c
@@ -353,8 +353,7 @@ static int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cm
{
target_t *target;
jtag_tap_t *tap;
- armv4_5_common_t *armv4_5;
- arm7_9_common_t *arm7_9;
+ struct arm *arm;
if (argc != 2)
{
@@ -369,9 +368,10 @@ static int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cm
return ERROR_FAIL;
}
- if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
+ arm = target_to_arm(target);
+ if (!is_arm(arm))
{
- command_print(cmd_ctx, "ETB: current target isn't an ARM7/ARM9 target");
+ command_print(cmd_ctx, "ETB: '%s' isn't an ARM", args[0]);
return ERROR_FAIL;
}
@@ -382,11 +382,11 @@ static int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cm
return ERROR_FAIL;
}
- if (arm7_9->etm_ctx)
+ if (arm->etm)
{
etb_t *etb = malloc(sizeof(etb_t));
- arm7_9->etm_ctx->capture_driver_priv = etb;
+ arm->etm->capture_driver_priv = etb;
etb->tap = tap;
etb->cur_scan_chain = 0xffffffff;