X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Fetb.c;h=b96ffe318af2e5b000c8284843b5924c6f2dee3f;hp=709bb008057ac8d686df6ec95533384184f244a0;hb=8c1ec4f0e1a7dd37a2549d83b6cd5c8c57eb34aa;hpb=40580e2d71ac56131a5da7e5f67a0b63450e4f24 diff --git a/src/target/etb.c b/src/target/etb.c index 709bb00805..b96ffe318a 100644 --- a/src/target/etb.c +++ b/src/target/etb.c @@ -36,7 +36,7 @@ #include -char* etb_reg_list[] = +static char* etb_reg_list[] = { "ETB_identification", "ETB_ram_depth", @@ -49,18 +49,13 @@ char* etb_reg_list[] = "ETB_control", }; -int etb_reg_arch_type = -1; +static int etb_reg_arch_type = -1; -int etb_get_reg(reg_t *reg); -int etb_set_reg(reg_t *reg, u32 value); -int etb_set_reg_w_exec(reg_t *reg, u8 *buf); +static int etb_get_reg(reg_t *reg); -int etb_write_reg(reg_t *reg, u32 value); -int etb_read_reg(reg_t *reg); +static int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); -int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); - -int etb_set_instr(etb_t *etb, u32 new_instr) +static int etb_set_instr(etb_t *etb, u32 new_instr) { jtag_tap_t *tap; tap = etb->tap; @@ -90,7 +85,7 @@ int etb_set_instr(etb_t *etb, u32 new_instr) return ERROR_OK; } -int etb_scann(etb_t *etb, u32 new_scan_chain) +static int etb_scann(etb_t *etb, u32 new_scan_chain) { if(etb->cur_scan_chain != new_scan_chain) { @@ -161,7 +156,7 @@ reg_cache_t* etb_build_reg_cache(etb_t *etb) return reg_cache; } -int etb_get_reg(reg_t *reg) +static int etb_get_reg(reg_t *reg) { int retval; if ((retval = etb_read_reg(reg)) != ERROR_OK) @@ -179,7 +174,7 @@ int etb_get_reg(reg_t *reg) return ERROR_OK; } -int etb_read_ram(etb_t *etb, u32 *data, int num_frames) +static int etb_read_ram(etb_t *etb, u32 *data, int num_frames) { scan_field_t fields[3]; int i; @@ -402,7 +397,7 @@ int etb_store_reg(reg_t *reg) return etb_write_reg(reg, buf_get_u32(reg->value, 0, reg->size)); } -int etb_register_commands(struct command_context_s *cmd_ctx) +static int etb_register_commands(struct command_context_s *cmd_ctx) { command_t *etb_cmd; @@ -413,7 +408,7 @@ int etb_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) +static int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) { target_t *target; jtag_tap_t *tap; @@ -467,7 +462,7 @@ int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char return ERROR_OK; } -int etb_init(etm_context_t *etm_ctx) +static int etb_init(etm_context_t *etm_ctx) { etb_t *etb = etm_ctx->capture_driver_priv; @@ -484,7 +479,7 @@ int etb_init(etm_context_t *etm_ctx) return ERROR_OK; } -trace_status_t etb_status(etm_context_t *etm_ctx) +static trace_status_t etb_status(etm_context_t *etm_ctx) { etb_t *etb = etm_ctx->capture_driver_priv; @@ -539,7 +534,7 @@ trace_status_t etb_status(etm_context_t *etm_ctx) return etm_ctx->capture_status; } -int etb_read_trace(etm_context_t *etm_ctx) +static int etb_read_trace(etm_context_t *etm_ctx) { etb_t *etb = etm_ctx->capture_driver_priv; int first_frame = 0; @@ -689,7 +684,7 @@ int etb_read_trace(etm_context_t *etm_ctx) return ERROR_OK; } -int etb_start_capture(etm_context_t *etm_ctx) +static int etb_start_capture(etm_context_t *etm_ctx) { etb_t *etb = etm_ctx->capture_driver_priv; u32 etb_ctrl_value = 0x1; @@ -721,7 +716,7 @@ int etb_start_capture(etm_context_t *etm_ctx) return ERROR_OK; } -int etb_stop_capture(etm_context_t *etm_ctx) +static int etb_stop_capture(etm_context_t *etm_ctx) { etb_t *etb = etm_ctx->capture_driver_priv; reg_t *etb_ctrl_reg = &etb->reg_cache->reg_list[ETB_CTRL];