scan_field_t -> struct scan_field
[fw/openocd] / src / target / xscale.c
index 6f2d6ee3dfe7ec562b92e2b06a7e07fc4187cb49..3540f6a607c70aec97a16759fa2cb505ecd3fe5a 100644 (file)
@@ -156,14 +156,14 @@ static int xscale_verify_pointer(struct command_context_s *cmd_ctx,
        return ERROR_OK;
 }
 
-static int xscale_jtag_set_instr(jtag_tap_t *tap, uint32_t new_instr)
+static int xscale_jtag_set_instr(struct jtag_tap *tap, uint32_t new_instr)
 {
        if (tap == NULL)
                return ERROR_FAIL;
 
        if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != new_instr)
        {
-               scan_field_t field;
+               struct scan_field field;
                uint8_t scratch[4];
 
                memset(&field, 0, sizeof field);
@@ -182,7 +182,7 @@ static int xscale_read_dcsr(target_t *target)
 {
        struct xscale_common_s *xscale = target_to_xscale(target);
        int retval;
-       scan_field_t fields[3];
+       struct scan_field fields[3];
        uint8_t field0 = 0x0;
        uint8_t field0_check_value = 0x2;
        uint8_t field0_check_mask = 0x7;
@@ -258,7 +258,7 @@ static int xscale_receive(target_t *target, uint32_t *buffer, int num_words)
 
        int retval = ERROR_OK;
        tap_state_t path[3];
-       scan_field_t fields[3];
+       struct scan_field fields[3];
        uint8_t *field0 = malloc(num_words * 1);
        uint8_t field0_check_value = 0x2;
        uint8_t field0_check_mask = 0x6;
@@ -362,7 +362,7 @@ static int xscale_read_tx(target_t *target, int consume)
        tap_state_t noconsume_path[6];
        int retval;
        struct timeval timeout, now;
-       scan_field_t fields[3];
+       struct scan_field fields[3];
        uint8_t field0_in = 0x0;
        uint8_t field0_check_value = 0x2;
        uint8_t field0_check_mask = 0x6;
@@ -458,7 +458,7 @@ static int xscale_write_rx(target_t *target)
        struct xscale_common_s *xscale = target_to_xscale(target);
        int retval;
        struct timeval timeout, now;
-       scan_field_t fields[3];
+       struct scan_field fields[3];
        uint8_t field0_out = 0x0;
        uint8_t field0_in = 0x0;
        uint8_t field0_check_value = 0x2;
@@ -614,7 +614,7 @@ static int xscale_write_dcsr(target_t *target, int hold_rst, int ext_dbg_brk)
 {
        struct xscale_common_s *xscale = target_to_xscale(target);
        int retval;
-       scan_field_t fields[3];
+       struct scan_field fields[3];
        uint8_t field0 = 0x0;
        uint8_t field0_check_value = 0x2;
        uint8_t field0_check_mask = 0x7;
@@ -686,7 +686,7 @@ static int xscale_load_ic(target_t *target, uint32_t va, uint32_t buffer[8])
        uint8_t packet[4];
        uint8_t cmd;
        int word;
-       scan_field_t fields[2];
+       struct scan_field fields[2];
 
        LOG_DEBUG("loading miniIC at 0x%8.8" PRIx32 "", va);
 
@@ -740,7 +740,7 @@ static int xscale_invalidate_ic_line(target_t *target, uint32_t va)
 {
        uint8_t packet[4];
        uint8_t cmd;
-       scan_field_t fields[2];
+       struct scan_field fields[2];
 
        jtag_set_end_state(TAP_IDLE);
        xscale_jtag_set_instr(target->tap, XSCALE_LDIC);
@@ -2868,7 +2868,7 @@ static int xscale_init_target(struct command_context_s *cmd_ctx,
 }
 
 static int xscale_init_arch_info(target_t *target,
-               xscale_common_t *xscale, jtag_tap_t *tap, const char *variant)
+               xscale_common_t *xscale, struct jtag_tap *tap, const char *variant)
 {
        armv4_5_common_t *armv4_5;
        uint32_t high_reset_branch, low_reset_branch;
@@ -3127,7 +3127,7 @@ COMMAND_HANDLER(xscale_handle_mmu_command)
 
        if (target->state != TARGET_HALTED)
        {
-               command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+               command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
                return ERROR_OK;
        }
 
@@ -3163,13 +3163,13 @@ COMMAND_HANDLER(xscale_handle_idcache_command)
 
        if (target->state != TARGET_HALTED)
        {
-               command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+               command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
                return ERROR_OK;
        }
 
-       if (strcmp(cmd, "icache") == 0)
+       if (strcmp(CMD_NAME, "icache") == 0)
                icache = 1;
-       else if (strcmp(cmd, "dcache") == 0)
+       else if (strcmp(CMD_NAME, "dcache") == 0)
                dcache = 1;
 
        if (argc >= 1)
@@ -3302,7 +3302,7 @@ COMMAND_HANDLER(xscale_handle_trace_buffer_command)
 
        if (target->state != TARGET_HALTED)
        {
-               command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+               command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
                return ERROR_OK;
        }
 
@@ -3420,7 +3420,7 @@ COMMAND_HANDLER(xscale_handle_dump_trace_command)
        target_t *target = get_current_target(cmd_ctx);
        struct xscale_common_s *xscale = target_to_xscale(target);
        xscale_trace_data_t *trace_data;
-       fileio_t file;
+       struct fileio file;
        int retval;
 
        retval = xscale_verify_pointer(cmd_ctx, xscale);
@@ -3429,7 +3429,7 @@ COMMAND_HANDLER(xscale_handle_dump_trace_command)
 
        if (target->state != TARGET_HALTED)
        {
-               command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+               command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
                return ERROR_OK;
        }
 
@@ -3499,7 +3499,7 @@ COMMAND_HANDLER(xscale_handle_cp15)
 
        if (target->state != TARGET_HALTED)
        {
-               command_print(cmd_ctx, "target must be stopped for \"%s\" command", cmd);
+               command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME);
                return ERROR_OK;
        }
        uint32_t reg_no = 0;