diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-11 04:42:50 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2009-11-11 04:42:50 -0800 |
commit | d796ce0e4d17e8a140ad0efa8c63c828ca185455 (patch) | |
tree | 2b7bd55cb37c3d13c847a4c4697da26a1aa8dcf8 /src/target/etm.h | |
parent | 583a293a326bcb4b7438871d492cd85c143e3fa1 (diff) | |
download | riscv-openocd-d796ce0e4d17e8a140ad0efa8c63c828ca185455.zip riscv-openocd-d796ce0e4d17e8a140ad0efa8c63c828ca185455.tar.gz riscv-openocd-d796ce0e4d17e8a140ad0efa8c63c828ca185455.tar.bz2 |
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 <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/etm.h')
-rw-r--r-- | src/target/etm.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/target/etm.h b/src/target/etm.h index c751aac..2335c98 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 */ |