From 9855a11eddc38b812203facd7a52a71422b19272 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Wed, 11 Nov 2009 21:52:02 -0800 Subject: 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 --- src/target/etm_dummy.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/target/etm_dummy.c') diff --git a/src/target/etm_dummy.c b/src/target/etm_dummy.c index 4b84fd32..eba1865e 100644 --- a/src/target/etm_dummy.c +++ b/src/target/etm_dummy.c @@ -28,8 +28,7 @@ static int handle_etm_dummy_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) { target_t *target; - armv4_5_common_t *armv4_5; - arm7_9_common_t *arm7_9; + struct arm *arm; target = get_target(args[0]); @@ -39,15 +38,16 @@ static int handle_etm_dummy_config_command(struct command_context_s *cmd_ctx, ch 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, "current target isn't an ARM7/ARM9 target"); + command_print(cmd_ctx, "target '%s' isn't an ARM", args[0]); return ERROR_FAIL; } - if (arm7_9->etm_ctx) + if (arm->etm) { - arm7_9->etm_ctx->capture_driver_priv = NULL; + arm->etm->capture_driver_priv = NULL; } else { -- cgit v1.2.3