diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-11 21:52:02 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-11 21:52:02 -0800 |
commit | 9855a11eddc38b812203facd7a52a71422b19272 (patch) | |
tree | 6ccd624cc263845d8b3acea20e093f691b25d448 /src/target/etb.c | |
parent | 3ae44019018b7fa9adbe7dcf49c2b79e8e11acea (diff) | |
download | riscv-openocd-9855a11eddc38b812203facd7a52a71422b19272.zip riscv-openocd-9855a11eddc38b812203facd7a52a71422b19272.tar.gz riscv-openocd-9855a11eddc38b812203facd7a52a71422b19272.tar.bz2 |
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.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/target/etb.c b/src/target/etb.c index 41312be..28ef3ef 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; |