From d796ce0e4d17e8a140ad0efa8c63c828ca185455 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Wed, 11 Nov 2009 04:42:50 -0800 Subject: ETM cleanup Various cleanups of ETM related code. - Saner error return paths - Simplify arm7_9 init ... no need for extra zeroing! - Shrink some lines - Tweak some diagnostics - Use shorter name for ETM struct type. - Don't exit() and similar. The diagnostics look forward to having this ETM code work with more than just ARM7/ARM9. Signed-off-by: David Brownell --- src/target/etm.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/target/etm.h') diff --git a/src/target/etm.h b/src/target/etm.h index c751aac4..2335c983 100644 --- a/src/target/etm.h +++ b/src/target/etm.h @@ -115,17 +115,17 @@ typedef enum } etmv1_tracemode_t; /* forward-declare ETM context */ -struct etm_context_s; +struct etm; typedef struct etm_capture_driver_s { char *name; int (*register_commands)(struct command_context_s *cmd_ctx); - int (*init)(struct etm_context_s *etm_ctx); - trace_status_t (*status)(struct etm_context_s *etm_ctx); - int (*read_trace)(struct etm_context_s *etm_ctx); - int (*start_capture)(struct etm_context_s *etm_ctx); - int (*stop_capture)(struct etm_context_s *etm_ctx); + int (*init)(struct etm *etm_ctx); + trace_status_t (*status)(struct etm *etm_ctx); + int (*read_trace)(struct etm *etm_ctx); + int (*start_capture)(struct etm *etm_ctx); + int (*stop_capture)(struct etm *etm_ctx); } etm_capture_driver_t; enum @@ -146,7 +146,7 @@ typedef struct etmv1_trace_data_s * this will have to be split into version independent elements * and a version specific part */ -typedef struct etm_context_s +typedef struct etm { target_t *target; /* target this ETM is connected to */ reg_cache_t *reg_cache; /* ETM register cache */ -- cgit v1.2.3